Pausing Screen After Compiling...
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.
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.
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]
are you using C or C++?
[edited by - Tiffany Smith on July 4, 2003 6:39:54 PM]
Just stick getch() at the end of main to wait for a return key being pressed ... the header for getch() is conio.h.
yeah, like so ...
#include <conio.h> #include <iostream> using namespace std;int main(){ cout<<"hello world\n" << endl; getch();return 0;}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement