Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Output's order problem
Output's order problem [message #1781627] Fri, 09 February 2018 11:24 Go to next message
Eclipse UserFriend
Hi,

i've got some problems with a simple code like this:

#include <stdio.h>
#include <stdlib.h>

int main(void) {
int x;
printf("Inserisci valore:");
scanf("%d",&x);
printf("Valore stampato: %d",x);

}

I need to insert a number before to see the first printf..

OUTPUT:
2//a random number insert by me
Inserisci valore: Valore stampato: 2

My os is Win10.
I use MinGW.
I have the latest versione of Eclipse oxygen.
I edit the Hello world example.
I have already installed java sdk and java jre.
I've already tried to unistall and re-install both java and eclipse.

Re: Output's order problem [message #1781641 is a reply to message #1781627] Fri, 09 February 2018 23:10 Go to previous messageGo to next message
Eclipse UserFriend
Use fflush(stdout) to flush the output buffer after your prompt.
You may also need to append \n to your prompt
Re: Output's order problem [message #1781647 is a reply to message #1781641] Sat, 10 February 2018 07:11 Go to previous message
Eclipse UserFriend
Oh god, it works! Thanks a lot!
Previous Topic:C to MIPS Converter
Next Topic:Eclipse Debugger Issue
Goto Forum:
  


Current Time: Fri Jul 04 11:51:09 EDT 2025

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

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

Back to the top