Stupid.Fat.Cat
Stupid.Fat.Cat

Reputation: 11295

Eclipse C++ CDT Kepler not showing console output until the end of execution

After I build a program, and run it, the console stays empty, while it's waiting for my scanf prompts, after pressing "Enter" on the console window in Eclipse, everything prints out, almost as if the whole buffer is being saved somewhere and then printed out. Is there a way to show the output on the console as it's being printed, and not wait until the end of execution to print everything?

Upvotes: 2

Views: 833

Answers (1)

shakil
shakil

Reputation: 36

try this line fflush(stdout); after ther first output printf statement...this will work fine

read this post as a reference: https://bugs.eclipse.org/bugs/show_bug.cgi?id=173732

Upvotes: 2

Related Questions