Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse won't show me the finished program (C)
Eclipse won't show me the finished program (C) [message #1719778] Mon, 11 January 2016 18:50 Go to next message
Eclipse UserFriend
Hello Community,
2 days ago I started learning C. After a bit of research I've choosen eclipse IDE. It's my first programming language I learn and I'm very motivated, it' really fun. I learn from a book I bought. (C for beginners)
So the book I bought gave me an example source code and I have to write it down into my IDE. The goal is it to fill in a number for x (the number 12) and for y (the number 3) while the program is running and then the programm calculates it. I wrote down the source code and build it up (Ctrl+b) and tried to run it but in my console window nothing appears.
I wrote down a few other example's before like the hello world source code and all worked fine and showed me the final programm in the console.)
I already checked the source code but it's all fine I wrote nothing wrong.
I use MinGW Compiler and I run it as local C/C++ Application.
I already tried to make a new project but this also showes me nothing.
As soon as I try to run a source code where I am supposed to type something in while the program is running nothing shows up.

I uploaded a few screenshots for you.

"Bitte x/y eingeben" = "Please insert x/y"

I hope you can help me guys!
  • Attachment: wbap6ex.png
    (Size: 245.35KB, Downloaded 213 times)
  • Attachment: xuN1rhc.png
    (Size: 238.63KB, Downloaded 211 times)
Re: Eclipse won't show me the finished program (C) [message #1719813 is a reply to message #1719778] Tue, 12 January 2016 04:36 Go to previous messageGo to next message
Eclipse UserFriend
It seems that you're using Windows and MinGW.

If I remember correctly, the console driver in the combination buffers its output until a newline, so your output may be lying in the buffer.

I do not have Windows available for testing, but you could try adding
fflush(stdout);
before the scanf() lines.
Re: Eclipse won't show me the finished program (C) [message #1719834 is a reply to message #1719813] Tue, 12 January 2016 08:57 Go to previous message
Eclipse UserFriend
Tauno Voipio wrote on Tue, 12 January 2016 09:36
It seems that you're using Windows and MinGW.

If I remember correctly, the console driver in the combination buffers its output until a newline, so your output may be lying in the buffer.

I do not have Windows available for testing, but you could try adding
fflush(stdout);
before the scanf() lines.



It finally works!
Thank you very much! Smile
Previous Topic:Shared Library and linked sources
Next Topic:Problem Editing Settings under CentOS 7
Goto Forum:
  


Current Time: Sun Nov 09 06:21:20 EST 2025

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

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

Back to the top