Hi all,

I have installed Qt 5.0.1 with QtCreator 2.6.2 on Windows 7 and experience a strange behaviour. When I start a new plain C project, everything works fine (the standard Hello World is printed to the console). However when I start a new plain C++ project, again the Hello World is printed to the console but a new (native Microsoft) window pops up and tells me that myprogramname.exe doesn't work anymore . And what I really don't get is the fact that if I delete the part "<< endl" everythings run without problems!

It seems like Qt is having trouble with endl. When I hover endl with my cursor, it says something like "QTextStream & endl...", whereas hovering cout results in "std::cout". Is this perhaps my problem? Can you replicate my problem on your PC? What can I do to fix this problem?

main.cpp
Qt Code:
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. cout << "Hello World!" << endl;
  8. return 0;
  9. }
To copy to clipboard, switch view to plain text mode 

myprogramname.pro
Qt Code:
  1. TEMPLATE = app
  2. CONFIG += console
  3. CONFIG -= app_bundle
  4. CONFIG -= qt
  5.  
  6. SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode