Beginning: Need Help on an Issue.

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2005
Posts: 1
Reputation: Ian13 is an unknown quantity at this point 
Solved Threads: 0
Ian13 Ian13 is offline Offline
Newbie Poster

Beginning: Need Help on an Issue.

 
0
  #1
Feb 23rd, 2005
Im just beginning on C++, and one of the main problems that Ive encountered that I would like to get past is the fact that with simple programs you can only enter one thing, and after the code executed after that function is done, all you can do is press enter and the application quits.
The most complex program I have made tells you to input a country. Three countries are displayed across the top, and a number is assigned to each one. You type that number in and press enter and a printf function shows some text talking about that country. But after that, all you can do is press enter and the application closes. Can anyone help me with getting past this? I want it to be where you can enter another country other than the one you just looked at and it will display the data for that country too.
I think that it might have something to do with variables and looping? (Which I know a few things about.)
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,361
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 240
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Beginning: Need Help on an Issue.

 
0
  #2
Feb 24th, 2005
Originally Posted by Ian13
Can anyone help me with getting past this? I want it to be where you can enter another country other than the one you just looked at and it will display the data for that country too.
I think that it might have something to do with variables and looping? (Which I know a few things about.)
Write code. If you want to answer lots of questions, write lots of questions. If you want to keep your answers, store them in lots of variables. If you want to make life easier, learn about arrays and looping.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC