[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:



> ido naveh wrote:
> 
> hi -
> im doing some beginners C programming on a redhat 7.1.
> when including stdio.h and trying to use the "flushall()"
> function, the gcc will not compile the code.
> im getting error for "no reference to flushall()".
> iv`e checked the stdio.h file and theres no flushall() function in it.
> the same thing DOES work in windows 2000.
> how can i flush the buffer after using "scanf()" or "getchar"
> in order to clear it for another "getchar()"   ????

flushall() is a microsoftism, me thinks.


FFLUSH(3)           Linux Programmer's Manual           FFLUSH(3)
 
NAME
       fflush - flush a stream
 
SYNOPSIS
       #include <stdio.h>
 
       int fflush(FILE *stream);
 
DESCRIPTION
       The function fflush forces a write of all user-space buffered
data for the given out­
       put or update stream via the stream's underlying write function. 
The open status  of
       the stream is unaffected.
 
       If the stream argument is NULL, fflush flushes all open output
streams.


Gilad.

To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il