clearerr

void clearerr ( FILE * stream );

Clear error indicators

Resets both the error and the eof indicators of the stream.

When a i/o function fails either because of an error or because the end of the file has been reached, one of these internal indicators may be set for the stream. The state of these indicators is cleared by a call to this function, or by a call to any of: rewind, fseek, fsetpos and freopen.