I have to create a C++ game that is 500 lines of code. I'm at 250 right now and I was wondering how do you create a basic menu that would allow the user to push either 1 for highest score,2. to play game, and 3 for help which would give the rules of the game? Would it be using if/else statements or functions? Can anyone point me in the right direction
How to keep player scores and create a basic menu in a C++ console game?
I think it might be better to use a switch statement for the menu.
1 for highest score,
2. to play game,
3 for help which would give the rules of the game
It'd be best for the menu to be it's own function.
int main()
{
menu();
return 0;
}
Menu will be called then the switch will do a different case depending on the user's input.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment