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/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdio.h>
    void clearerr( FILE *fp );

Description:
    The clearerr function clears the end-of-file and error indicators for
    the stream pointed to by fp.  These indicators are cleared only when the
    file is opened or by an explicit call to the  clearerr or  rewind
    functions.

Returns:
    The clearerr function returns no value.

See Also:
    feof, ferror, perror

Example:
    #include <stdio.h>

    void main()
      {
        FILE *fp;
        int c;

        c = 'J';
        fp = fopen( "file", "w" );
        if( fp != NULL ) {
          fputc( c, fp );
          if( ferror( fp ) ) {  /* if error        */
              clearerr( fp );   /* clear the error */
              fputc( c, fp );   /* and retry it    */
          }
        }
      }

Classification:
    ANSI

Systems:
    All

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