So I'm looking to create a function that prompts the user to enter 'Y' for "Yes restart the program" and 'N' for No, do not restart.
I know this should use the boolean operator, I'm just unsure as to how to implement it.
I also know to encase the body in a while loop ending in "else if ('no')" for example.
I know this is completely wrong, but it's what I'm thinking could work:
bool selectRestart(int y, int n)
{
int y = 1;
int n = 0;
cout << "Would you like to restart? [Y]es [N]o: " << endl;
cin >> select;
}
and the while loop being something like:
while(select == 1)
{
~
}
else if(select == 0)
{
return 0;
}
Thanks a lot for all the help!