cout - How to get window to stay open after C++ code runs? -
cout - How to get window to stay open after C++ code runs? -
possible duplicate: how stop c++ console application exiting immediately?
i trying see results, do code can see if did correct?
#include <iostream> using namespace std; int main() { cout << "c++" << endl; cout << "the sum of 11 + 12 = " << 30/2 << endl; homecoming 0; }
i think mean dos terminal closes programme ends.
a mutual solution have phone call cin
, scanf
or getch
@ end of program, before return 0
. forces programme wait user input before exiting.
a improve way compile programme , run within dos prompt yourself. start dos prompt, cd
directory programme in , run there.
c++ cout dev-c++
Comments
Post a Comment