- #1
Heisenberg.
- 68
- 0
I have been creating simple programs from the hello world one to simple math and loops - all of a sudden when I went to practice more today my programs would be completed but the window showing the result would pop up and almost instantaneously close itself - in the end I can't see the result, here is a simple example where code seems fine no errors are shown but the result window is not staying up long enough:
#include <iostream>
using namespace std;
int main ()
{
int a, b;
int result;
a=5;
b=3;
result=a+b;
cout << result;
return 0;
}
I am new to c++, so I have no idea where to even look to fix this problem - it seems like the result window is not staying up long enough - any ideas? and please inform me if I am not being clear enough
#include <iostream>
using namespace std;
int main ()
{
int a, b;
int result;
a=5;
b=3;
result=a+b;
cout << result;
return 0;
}
I am new to c++, so I have no idea where to even look to fix this problem - it seems like the result window is not staying up long enough - any ideas? and please inform me if I am not being clear enough