there are three different possible sizes for the array 4, 6, or 8. For some reason 4 and 6 work, but not 8. Basically anything 8 and up doesn't work. Heres the code that sets the array size.
//the function that sets the array size
int gameLevel(){
int level, size = 1;
cout << "What level difficulty do you what to play?\n" << "Easy(1), Normal(2), Hard(3): ";
cin >> level;
/*while(level != 1 && level != 2 && level != 3){
cout << "That is not one of the difficulty levels.\n" << "Easy(1), Normal(2), Hard(3): ";
cin >> level;
}*/
cout << "out of loop";
switch(level){
case 1:
cout << "easy";
size = 4;
break;
case 2:
cout << "normal";
size = 6;
break;
case 3:
cout << "hard";
size = 8;
break;
}
return size;
}
//the first bit of main with the function
int main(){
bool allCorrect = false, get = true;
ofstream outputFile;
int theMode, size, numGuesses = 15, playersGuesses = 0;
menu(); //Menu, choocing game mode
theMode = gameMode();
size = gameLevel();
return 0;
}