Jump to content
  • Advertisement

Archived

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

Floating

Closing automatically console window

This topic is 5937 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

Hi, I have a console application under windows which always needs a key press when terminated, which is quite annoying. How can I avoid this? Thanks

Share this post


Link to post
Share on other sites
Advertisement
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
Take out the system("PAUSE";

Try that...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
where i find "system("PAUSE";"

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!