pause command for c++

Status
Not open for further replies.

Tallyrand

Solid State Member
Messages
8
#include <iostream>

int main ()
{
using namespace std;

cout << "Text";

return 0;
}
----------------------------------------------------------------------------------
the console screen shuts whenever i open it how would i pause it so it wont shut.
 
Well, first, are you using C++.NET? If you are then instead of that use cin.ignore(); on a line before the return statement...
 
If you include the windows.h file you can use the Sleep();command, with the duration within the parenthesis.
 
Status
Not open for further replies.
Back
Top Bottom