create menus in command line

Posted by Miles Rout on Stack Overflow See other posts from Stack Overflow or by Miles Rout
Published on 2011-01-14T04:44:29Z Indexed on 2011/01/14 4:53 UTC
Read the original article Hit count: 191

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about c++

Related posts about menu