Advertisement Jump to content

Archived

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

GemuRell

quickly closing windos in devcpp...

This topic is 5351 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.

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!