LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-21-2004, 04:30 PM   #1
genesis12
LQ Newbie
 
Registered: Jan 2004
Distribution: mandrake 9.1
Posts: 9

Rep: Reputation: 0
Quick c++ question


I am writing a simple program that executes a certain set of operations depending on the user's input. my questions is, what code can i use to make my program execute some commands when the user enters 'operation1' or 'operation2'?
For example,
If the user enters 'hello1', then execute this......
If the user enters 'hello2', then execute this....

Thanks!
 
Old 03-21-2004, 04:43 PM   #2
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
http://www.catb.org/~esr/faqs/smart-questions.html
 
Old 03-21-2004, 04:48 PM   #3
amos
Member
 
Registered: Dec 2002
Location: Bolton, UK
Distribution: Kubuntu
Posts: 224

Rep: Reputation: 30
Download this book:

http://www.ouwho.co.uk/eckel/TICPP-2nd-ed-Vol-one.zip

and in various chapters you'll find code showing you how to do what you want.

Cheers
Amos
 
Old 03-21-2004, 05:35 PM   #4
genesis12
LQ Newbie
 
Registered: Jan 2004
Distribution: mandrake 9.1
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks, this greatly helped me! Thanks again!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
quick question Squall__99 Mandriva 3 06-01-2005 03:13 PM
Quick Question? hydraspective Linux - Hardware 1 12-14-2004 11:51 PM
Question Concerning ISO's and one quick question. evrae Linux - Software 2 06-21-2004 03:53 AM
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 07:19 AM
Quick Question Westquote Linux - General 1 01-21-2002 09:37 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration