going up a menu - 'the BACK button'

Hi, I am using the command window executable file to run my program.
I was wondering if anyone knew a better method to be used to go up a menu:
say that you were setting up a citizen's details, and you entered the wrong date of birth and now you're entering his/her profession... how can I go back to entering date of birth.

Like, how to press back in the main program?
(I know while loop is one method, is there another way? if not, whats the best way to do the while loop? )

Thank you.
Last edited on
1
2
3
4
5
6
7
8
9
10
char x;    //To validate the choices
do
{
   //User chooses every citizen details he has to enter

   cout << //Show what was chosen as the details;
   cout << "Are you sure you want to keep these details? <Y/N>";
   cin >> x;
}
while(x == 'N');


Something like that should work, just do the same for every menu.
Last edited on
Topic archived. No new replies allowed.