How do I pauses the screen after my program is done?
I think it's called " system("PAUSE") " it makes a line in the screen that says " press any key to continue".
Thanx
:confused:
Printable View
How do I pauses the screen after my program is done?
I think it's called " system("PAUSE") " it makes a line in the screen that says " press any key to continue".
Thanx
:confused:
Here it is:
Code:#include <cstdlib>
using namespace std;
int main()
{
system("pause"); // Also works with 'PAUSE'.
return 0;
}
a better way to do it (system calls are slow and unoptomised)
is include conio.h
and use
cout<<"press any key to proceed";
int wait = getch(); //pauses until keypress
//rest of your code