Pregunta

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?

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top