Definition | #include <stdio.h> int ferror(FILE *fp);
| ||
Return val. |
0 | An error flag is set. No error flag is set. | |
Notes |
The error flag remains set until the associated file pointer is released (e.g. by You should always use | ||
Record I/O Example |
The following program fragment checks before each fread call whether an error has been FILE *fp; char buf[10]; char x[5]; while( !ferror(fp)) fread(buf,sizeof(x),10,fp); | ||
See also | clearerr, feof, fopen, fopen64 |