Author Topic: No output shown - cout not working  (Read 6058 times)

NoxMortem

  • Guest
No output shown - cout not working
« on: April 04, 2013, 10:38:10 pm »
Even the simple with the wizard generated "Console program" does not show any output. It compiles and runs and i see a console but i do not get any output.

Code
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}

Any ideas how i can fix this? It is pretty difficult developing without that as a nice debugging option ;)

OS: Windows 7
Compiler: MinGW
Code::Blocks 12.11

Edit: I have of course already looked through a lot of "cout not working"-threads. It seems this problem occurs more often than i thought but there was no solution yet. Pause on exit is checked.

Edit2: If i manually compile with "g++ main.cpp" and then run the program from the console i get my output "Hello World". I hope this helps with finding a solution.

Edit3: Sorry it was my own fault. I still hat the -mwindows compiler flag set. Can someone pls close this thread, but maybe keep it - as others maybe are as dumb as i were.
« Last Edit: April 04, 2013, 10:52:27 pm by NoxMortem »