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 ferror( FILE *fp );

Description:
    The ferror function tests the error indicator for the stream pointed to
    by fp.

Returns:
    The ferror function returns non-zero if the error indicator is set for
    fp.

Example:
    #include <stdio.h>

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

        fp = fopen( "file", "r" );
        if( fp != NULL ) {
          c = fgetc( fp );
          if( ferror( fp ) ) {
            printf( "Error reading file\n" );
          }
        }
        fclose( fp );
      }

Classification:
    ANSI

Systems:
    All, Netware

See Also:
    clearerr, feof, perror, strerror

See Also: clearerr feof

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