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.)

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.