To make the output window stay you can make the program wait for the user to press a key, so that you get to see the output of your program.
If using C++ you can place cin.get( ) at the end of your program, before return 0.
If using C, you can place getchar( ) at the end of your program, before return 0.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
I think that Dev C++ follows the standard better, since it really uses a very common open source compiler. A program should close unless you make it wait within the code. Anything else is added by the IDE and is not standard.
Your version of Borland C++ is very old. Also Borland has a long history of straying from the standards. I am really surprised they are still around.
Ene Uran
Posting Virtuoso
1,723 posts since Aug 2005
Reputation Points: 625
Solved Threads: 213
I think that Dev C++ follows the standard better, since it really uses a very common open source compiler. A program should close unless you make it wait within the code. Anything else is added by the IDE and is not standard.
Your version of Borland C++ is very old. Also Borland has a long history of straying from the standards. I am really surprised they are still around.
Agreed...better get a modern compiler which discourage you by disallowing you from using non standard functions."system("PAUSE");" can make the console window stay until you press any key.
This is bad programming practice and for the reasons why, you can see a really good article by my friend and moderator Mr. WaltP.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
Bad programming practice is bad programming practice, be it a simple "hello world" program or a complete software.
Maybe time and experience will teach you that, but lets hope its not the hard way for you....;)
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734