#include <cstdio> int feof( FILE *stream );
The function feof() returns TRUE if the end-of-file was reached, or FALSE otherwise.