I need a code for my menu that lets say I open the start game section well in start game I have press 0 to go back and press 1 to make a new game, how can I make it where press 1 to start a new game will open with the stuff inside of it, get what I mean?
class Game
{
// Your game code
};
int main()
{
// A pointer to the game class
Game* game;
char value;
std::cin >> value;
if(value == 0)
{
// Your code to go back.
}
elseif(value == 1)
{
game = new Game;
}
// Your game code should run once you called the class functions
game->Loop();
// Free the memory you allocated.
delete game;
return 0;
}