Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 14th, 2004, 07:39 PM
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






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to open IIS console from "Start-Run" menu jayaraj123 ASP.NET 2.0 Professional 16 June 27th, 2012 08:43 AM
CH 15 Context Menu - Element Menu Items Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 2 November 9th, 2008 03:53 PM
Console application but no Console gamotter C# 2 August 22nd, 2007 11:41 PM
right click menu hidden by drop-drown menu Andraw HTML Code Clinic 0 March 18th, 2005 03:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.