Table of Contents
Previous Section Next Section

ferror

#include <stdio.h>int ferror(FILE *stream);

The ferror( ) function checks for a file error on the given stream. A return value of zero indicates that no error has occurred, while a nonzero value means an error.

To determine the exact nature of the error, use the perror( ) function.

Related functions are clearerr( ), feof( ), and perror( ).


Table of Contents
Previous Section Next Section