Thread: console menu
View Single Post
  #1 (permalink)  
Old April 14th, 2004, 07:39 PM
Xanoo Xanoo is offline
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default console menu

Hello

I'm trying to make a menu in c++ dos console that can take one or two arguments. As I understand a switch case would only take simple data structures. I would like a menu selection like this for example:

N - new player data
P A - display all players
P 23 - display player 23
P brian - display data about brian
Q - quit program

I've though about using a char array as input, and strtok somehow with alot of if else. But it will be a mess. Anyone got an example if they have done this before, or a better suggestion than strtok and if else's ?

thanks
- xan