Re: Problem with eclipse and a simple c program
- From: jacob navia <jacob@xxxxxxxxxx>
- Date: Wed, 12 Dec 2007 11:12:09 +0100
lionelgreenstreet@xxxxxxxxx wrote:
I have some problems when this simple program run with eclipse:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int number;
printf("Enter a number\n");
scanf("%d", &number);
printf("You entered %d", number);
return 0;
}
In run mode on consolle nothing appear, "enter a number" appears only
after the inserction of a number and not before. Why?
Thanks
When I run this from a console it works correctly here
(windows vista 64/ lcc-win compiler)
Maybe in some systems you have to write
fflush(stdout);
after the printf statement. Try that.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
.
- References:
- Problem with eclipse and a simple c program
- From: lionelgreenstreet
- Problem with eclipse and a simple c program
- Prev by Date: Re: As a programmer of both languages...
- Next by Date: Re: As a programmer of both languages...
- Previous by thread: Problem with eclipse and a simple c program
- Next by thread: Re: Problem with eclipse and a simple c program
- Index(es):
Relevant Pages
|