ive written and comiled the "hello world" thing using Dev-C++
when i run the exe, a dos-like window pops up for half sec and dissapears...wtf? ive read and reread over what i am meant to do...?!?!?! is that whats meant to hpn?
The program is doing exactly what it is supposed to do, the only thing being the command window closes after displaying the output.
To make the command window stay, make the program wait for some event (like accepting a key from the user) to see the expected output.
In C do
getchar( ) at the end of the program.
In C++ do
cin.get( ) at the end of the program.
Any other method used, is totally platform / compiler dependent and should be best avoided.
BTW even
system( "pause" ) is a non-standard method which is best avoided.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
Offline 8,871 posts
since Jun 2006