Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Console ouput coming only after termination (There's no output to Eclipse's console until the program terminates.)
Console ouput coming only after termination [message #1726921] Thu, 17 March 2016 12:55 Go to next message
Ignacio Arango is currently offline Ignacio ArangoFriend
Messages: 2
Registered: March 2016
Junior Member
Hello.

When I execute my C/C++ program under Eclipse Luna, CDT 8.6, Cygwin tools, no output is delivered to console until the program terminates. At that moment all the output gets delivered to the console, thus making impossible to execute interactive programs. When run outside Eclipse, they run fine.

Thanks for your help!
Re: Console ouput coming only after termination [message #1726943 is a reply to message #1726921] Thu, 17 March 2016 15:41 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Try unbuffering the output stream.

for iostreams (such as cout) : std::cout.setf(std::ios::unitbuf;
for FILE streams (such as stdout): use setvbuf
http://www.cplusplus.com/reference/cstdio/setvbuf/
Previous Topic:Error setting breakpoint: type root could not be computed
Next Topic:WINDOW BUILDER FOR ECLIPSE MARS C++
Goto Forum:
  


Current Time: Thu Apr 25 10:52:31 GMT 2024

Powered by FUDForum. Page generated in 0.03977 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top