I'm wanting to continue from current function onto the next one using appropriate input, I am also wanting to exit the program entirely through appropriate input, to give you an idea this is what I currently have:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
void Menu()
{
system("cls");
cout << " MAIN MENU" << endl;
cout << "To play, type 'Y'." << endl;
cout << "Or to quit, type 'N'." << endl;
string choice1;
cin >> choice1;
if (choice1 == "Y" || choice1 == "y")
{
//continue to next function
}
elseif (choice1 == "N" || choice1 == "n")
{
//exit program
}
}
I am aware that you cannot use return 0; within a void function in order to exit the program, I am wandering what possible ways I could go about doing this?
Damn, I was trying to do something similar to this before, but it wasn't working, thank you so much.
I also have another problem if your able to help, i'm wanting to also do something similar to this but to re-run the program after appropriate input and also exit the program at the end of it through appropriate input, for an idea: