Your main problem is to use goto, get rid of it!
yesOrNo: cout << "Hello " << charName << ". Are you ready to begin?" << endl; getline(cin, charChoice); transform( charChoice.begin(), charChoice.end(), charChoice.begin(), toupper ); cout << charChoice << endl; if(charChoice == "YES"){ cout << "Good. Let begin." << endl; } else if(charChoice == "NO"){ system ("exit"); } else { cout << "That is not a good answer." << endl; goto yesOrNo; }
can be replaced by
do { cout << "Hello " << charName << ". Are you ready to begin?" << endl; getline(cin, charChoice); transform( charChoice.begin(), charChoice.end(), charChoice.begin(), toupper ); cout << charChoice << endl; if(charChoice == "YES"){ cout << "Good. Let begin." << endl; startGame();
You can also return to the main menu after the end of the game.
I also recommend that you divide the game logic into different functions, the code will be much easier to write and maintain. I would also recommend rewriting your game in an object-oriented way after you finish, this may be good practice for you. And forget about goto , it can turn any code into a piece of crap.
source share