I've always used a do while statement along with some switches
but there's a few ways to do it. Most will say to make it so the exit just runs to the end of the main function and let it quit safely, in lengthy programs, i prefer to use the exit command.
this is not the most proper way it's just how I usually do it. Hope this helps you.
cout<< " (1) Do this \n";
cout<<" (2) Do that \n";
cout<<" (3) Exit \n";
}while(selection > 3 || selection < 1);
cout<<" bla \n\n";
cout<<"bla bla \n\n";
} //end switch