Computer Science Canada

Program quitting

Author:  lord_pwnerer [ Sun Nov 19, 2006 7:59 pm ]
Post subject:  Program quitting

Hi,

I'm using Dev-C++ (just in case it matters). And I was wondering, if it's possible for, instead of the window closing automatically after execution, is it possible for it to stay open?

Write now, after it asks for input, it will echo that input (I'm new). But the thing is, it will only do it for half a second. Is there a way for the window to stay open after the execution is finished?

Sorry if this has already been asked, but I couldn't find it anywhere. I'm totally knew to C++ btw

Author:  wtd [ Sun Nov 19, 2006 8:28 pm ]
Post subject: 

First tip for C++: don't use Dev-C++.

Author:  md [ Sun Nov 19, 2006 9:43 pm ]
Post subject: 

The problem is that dev-c++ opens a new console window to execute your code in. When your program finishes the new window is closed, and you can't see your ouput. The solution is to either wait for input at hte end of your progra just before returning, or invoke your program from a command line.

The second (along with using gcc directly, or with makefiles) is probably the better way and will get you more comfortable with the language/compiler.


: