Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdio.h>
    int fflush( FILE *fp );

Description:
    If the file fp is open for output or update, the fflush function causes
    any unwritten data to be written to the file.  If the file fp is open
    for input or update, the fflush function undoes the effect of any
    preceding  ungetc operation on the stream.  If the value of fp is NULL,
    then all files that are open will be flushed.

Returns:
    The fflush function returns non-zero if a write error occurs and zero
    otherwise.  When an error has occurred,  errno contains a value
    indicating the type of error that has been detected.

Example:
    #include <stdio.h>
    #include <conio.h>

    void main()
      {
        printf( "Press any key to continue..." );
        fflush( stdout );
        getch();
      }

Classification:
    ANSI

Systems:
    All, Netware

See Also:
    fgetc, fgets, flushall, fopen, getc, gets, setbuf, setvbuf, ungetc

See Also: flushall setbuf

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson