Pausing Screen After Compiling...

Started by
16 comments, last by Soccerman4 20 years, 9 months ago
After creating a program and running it the screen will flash up with the program really fast and then stop. I''ve heard about this problem before but I forgot how to deal with it. Oh by the way..I''m using the newest version of Dev-C++ as my compiler.
I exist.
Advertisement
System Pause maybe? I''ve heard thats not a good way to do it though....Any ideas?
I exist.
Any help would be greatly appreciated. Its kinda frustrating to create a program and have it just flash up and disappear before you can see it.
I exist.
Hey, you can always just make it wait for a keypress ...
are you using C or C++?

[edited by - Tiffany Smith on July 4, 2003 6:39:54 PM]
An ASCII tetris clone... | AsciiRis
C++, How would you make it do that?
I exist.
Just stick getch() at the end of main to wait for a return key being pressed ... the header for getch() is conio.h.
An ASCII tetris clone... | AsciiRis
Erm...So how might I put it in,say, a hello world program?
I exist.
yeah, like so ...

#include <conio.h> #include <iostream> using namespace std;int main(){	cout<<"hello world\n" << endl;  getch();return 0;}



An ASCII tetris clone... | AsciiRis
[In Mr. Byrnes voice] Excellent....RELEASE THE HOUNDS! (mr. byrns from the simpsons...)
I exist.
you''re welcome.
An ASCII tetris clone... | AsciiRis

This topic is closed to new replies.

Advertisement