when i compile something and run it, after the program runs, it closes the window imediately???
how do i stop this?
Add: #include <stdlib.h> Then add just before return: system("PAUSE");
Larry
Here a simple example:
#include <iostream> #include <stdlib.h >
using namespace std;
int id = 0;
int main() { cout << " enter: " ,cin >> id; cout << id << endl; system("PAUSE"); return 0; }
THANKS A LOT
Log in to post a comment.
when i compile something and run it, after the program runs, it closes the window imediately???
how do i stop this?
Add: #include <stdlib.h>
Then add just before return: system("PAUSE");
Larry
Here a simple example:
#include <iostream>
#include <stdlib.h >
using namespace std;
int id = 0;
int main()
{
cout << " enter: " ,cin >> id;
cout << id << endl;
system("PAUSE");
return 0;
}
Larry
THANKS A LOT