I was using Qt Creator 2.7.0 and compiling with 5.0.2 MinGW 32bit a simple C++ main.cpp:
#include <iostream>
using namespace std;
int main()
{
int i;
for (i=1; i<52; i++)
{
cout << i << endl;
}
return 0;
}
On project configuration I can check the box "Run in terminal", when I do this a Windows command prompt shows up and I get the expected results of 1 through 51 being printed out one number per line on each run of the program.
However, if I uncheck this and instead run this in the "Application Output" window. I get results that do not appear deterministic. On one run it output only the number 1, on another run it stopped at 48, another run stopped at 38. Each time reporting exited with code 0. Anyways, what's the deal here with this?
Here's the .pro
file:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp