Archived

This topic is now archived and is closed to further replies.

Closing automatically console window

This topic is 5567 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it a program you wrote? I''ve never had that happen before. You might want to check the Properties for the program. There might be a "Close window on exit" option.

Share this post


Link to post
Share on other sites
Yes I wrote a little Win32 console application and every time I leave the main function with "return 0", the console prints "Press any key to continue" and waits for a key before leaving...

Share this post


Link to post
Share on other sites
I would think that only happens when it''s started from the IDE, right?



When I look upon seamen, men of physical science, and philosophers, man is the wisest of all beings. When I look upon priests, prophets, and interpreters of dreams, nothing is so contemptible as man.


  Diogenes

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
MSVC console apps do this. There is a way around it but I can''t remember it at the moment. Check google. System("PAUSE" is commonly used with other compilers that don''t make you press a key to exit.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you compile the debug version of your program then it adds the system("PAUSE" for you, if you compile for release, it doens''t.

Share this post


Link to post
Share on other sites