Mail Archives: djgpp/1997/02/13/10:12:19
nikki wrote:
>
> > This may seem pretty lame, but I cannot figure out how to flush the
> > stdout. When I call fflush(stdout), I know there is stuff in the
> > buffer, but it doesn't display on the screen. What am I to do?
>
> this should work, eg something of the form
>
> printf("hello");
> fflush(stdout);
>
> would print hello out. perhaps you've redirected stdout? or perhaps you're
> not writing the data to stdout but stderr or somewhere weird?
>
> regards,
> nik
>
> --
> Graham Tootell
> nikki AT gameboutique DOT com
Ok, I have stdout working right (one of the variants of the code didn't
use stdout right), but currently, I'm having toruble getting input.
Here is where I am having the trouble:
fflush(stdout);fflush(stdin);
printf("Analyze (C)ompressed or (U)ncompressed file? ");
fflush(stdout);
option = getchar();
The coputer doesn't wait, but continues on even though I flushed the
stdin. Is there any other function I need call, or some little detail
I'm missing? Thanks.
Logan Bowers
- Raw text -