Standard C++ Library Reference ISO/IEC (VERSION3)
otherwise, it returns EOF. fclose writes any buffered output to the file, deallocates the stream
buffer if it was automatically allocated, and removes the association between the stream and the
file. Do not use the value of stream in subsequent expressions.
feof
int feof(FILE *stream);
The function returns a nonzero value if the end-of-file indicator is set for the stream stream.
ferror
int ferror(FILE *stream);
The function returns a nonzero value if the error indicator is set for the stream stream.
fflush
int fflush(FILE *stream);
The function writes any buffered output to the file associated with the stream stream and
returns zero if successful; otherwise, it returns EOF. If stream is a null pointer, fflush
writes any buffered output to all files opened for output.
fgetc
int fgetc(FILE *stream);
The function reads the next character c (if present) from the input stream stream, advances
the file-position indicator (if defined), and returns (int)(unsigned char)c. If the
function sets either the end-of-file indicator or the error indicator, it returns EOF.
fgetpos
int fgetpos(FILE *stream, fpos_t *pos);
The function stores the file-position indicator for the stream stream in *pos and returns zero
if successful; otherwise, the function stores a positive value in errno and returns a nonzero
value.