+ 2
[SOLVED] How can I print something to console before getting user input in eclipse?
hey, I'm using eclipse AND I wanted to know why it works the way I want when I execute the exe file that the compiler made of my code? * I know it doesn't work in sololearn it's about Eclipse IDE. this is my code: https://code.sololearn.com/cM2S0v63m9lU/?ref=app
6 Answers
+ 2
well, finally I found the solution.
the solution is to simply add fflush(stdout); after printf().
while it's still not working here but yeah thanks, I found my answer.
+ 3
Don't worry hamid ,
It only happens in Sololearn. Sololearn takes all input at running time. That's why before printing the input box is coming!
NOTE - Don't ask many questions in one post only
+ 2
Rishav Tiwari Thanks for answering I know it doesn't work in here my question is about Eclipse. In Eclipse it first asks for user input, then when you press the enter the rest of the code will execute while I want to execute the printf() then ask for user input.
+ 2
Rishav Tiwari What made you think I hadn't done any research on it? have you find anything on the internet?
+ 2
Go to ellipses sites, types your problems or do one thing see YouTube to see how to install
+ 1
Why don't you try Google for it!