One of the first things I learned in C++ was that
#include<iostream>
int main()
{
std::cout<<"Hello, World!\n";
return 0;
}
would simply appear and disappear extremely quickly without pause. To prevent this, I had to go to notepad, and save
helloworld.exe
pause
ase
helloworld.bat
This go tedious when I needed to create a bunch of small test programs, and eventually I simply put while(true);
at the end on most of my test programs, just so I could see the results. Is there a better wait function I can use?