#include <errno.h> extern int errno;
#include <stdio.h> int ferror(FILE *stream); int feof(FILE *stream); void clearerr(FILE *stream);
if( feof(some_stream) ) /*已经在文件末尾*/