Jump to content
  • Advertisement

Archived

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

GemuRell

quickly closing windos in devcpp...

This topic is 5231 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 and Im learning to program using C++, But I am having a major problem with DevC++. When I try to run my programs a black window just opens and closes within seconds and I cant stop it. Is there some kind of line of code that will pause or stop my screen from closing? -Thank you.

Share this post


Link to post
Share on other sites
Advertisement
In the top of your application, add in:

#include <conio.h>

And on the last line of your application, place this line:

getch(); // Wait for a key to be pressed


That''ll fix the problem

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!