6

I am using Eclipse IDE for C/C++ Developers (Eclipse Ganymede Package - version 3.4.2) on Windows XP with MinGW GCC 4.2.1 and GDB 6.8-3.

I am facing a problem very similar to that mentioned here. A simple hello world program will not print to the console output in the debugger. A run command displays the output correctly. I have checked both gdb output console and the output console.

What are the right settings to get the output in console window of eclipse?

1 Answer 1

2

//have you put endl at the end of your output?

int main()
{
    cout << "!!!Hello World!!!"; // prints nothing to console ; no endl
    cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! twice
    return 0;
}
Sign up to request clarification or add additional context in comments.

1 Comment

Adding the endl flush worked for me but there is a lot of discussion around this and I am not sure if this always works. It is worth looking at the related windows issues (which seems to be tied to a 32 vs 64 bit environment problem): eclipse.org/forums/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.