Very basic C++ question: running a prog on DevCPP

Associate
Joined
28 Jun 2004
Posts
917
Location
Sheffield
Just decided to start learning a bit of basic C++ and downloaded the DevCPP IDE/Compiler.

Whenever I execute a program, the console pops up for a split second and then disappears again. I can't see anything that's happening and it's very annoying!

How can I make it stay up until I decide to close the console and end the program?

Ta
 
Ta!

getch(); doesn't work - it says that 'getch' is undeclared
but std::cin.get(); works.

Tis a bit inconvinient to keep writing that at the end of any program I do just so I can see the output though. Isn't there any option in the IDE/compiler itself to do this?

None of the basic programs I'm seeing (eg Hello World etc) have anything like this, so isn't there a better way of doing this?
 
Back
Top Bottom