Switch structure not working
Hello again everyone... I'm kind of stumped on this one. I'm writing a small text based game, and none of my switch structures seem to be working. I am almost positive that the syntax is correct, but no matter what the input is, it always goes to the default choice, which returns to the menu. Here's my code:
Code:
switch(main_menu_choice){
case 1:
system("cls");
goto Play1;
case 2:
system("cls");
goto Help;
case 3:
exit(0);
default:
cout<<"Invalid entry. restarting game...";
system("Pause");
system("cls");
goto MainMenu;
}
I have no idea what goes wrong. This should work, shouldnt it?