ferror

Test if a file is in error.

int ferror (FILE * stream);

Required Header
<stdio.h>

Return Value

This function returns zero if the File is not in error, non-zero (1) otherwise. -1 indicates a more severe error in which case errno is set to EINVAL.

Parameters

stream

  A pointer to the open FILE structure

Remarks

clearerr resets the error indicator.

Stream I/O Routines

See Also    clearerr, _eof, feof, fopen, perror