Here is the simplest program:
#include <iostream>
using namespace std;
int main()
{
cout << "hello" << endl;
cin.get();
return 0;
}
When I ran it (using Dev C++), there is no output, just a blank screen. The problem seems to be from the "endl". If I delete it, or to replace it with
"hello\n"
then it displays the output "hello" as expected.
It would also work well if I just add another cout statement after the original cout, while keeping the "endl".
Why is the problem with "endl"?
Thanks in advance!