using a c++ tutorial doing exactly as said didnt let you see the results in dev-cpp, the window flashed then closed right away.
original(window closing code)
Code: Select all
#include <iostream.h>
int main()
{
cout << "Hello world\n";
return 0;
}
use
Code: Select all
#include <cstdio> and getchar()
Code: Select all
#include <cstdio>
#include <iostream.h>
int main()
{
cout << "Hello world\n";
getchar();
return 0;
}
for anyone who has the same problem while learning
NOTE: I know that <iostream.h> is outdated and is just <iostream> now but still works with dev-cpp and this is what the tutorial is saying so im going with what it is saying for now.