create menus in command line
- by Miles Rout
How can one create menus in the command line program? I've tried stuff like:
cin input;
switch (input) {
case (1):
// do stuff
case (2):
// ...
}
but then I've had the problem of sub-menus, and going back to the same menu, etc. The first program I wrote (apart from exercises) that tried to use the switch idea for the menus had goto statements because the alternative was heaps of (at the time) complicated loops.