common mistake when you use global variables.

Code:
.................
const int MAX_WRONG = 8; // maximum number of incorrect guesses allowed before death, change your total lives here
    wrong=0;//add this.
    random_shuffle(words.begin(), words.end());
.................