feof虽说是检测文件流结束符,但是要先读才能判断。也就是说,如果是一个空文件,在feof之前没有读过一次,feof的返回值依然是0。这就是为什么用feof复制文件时,目标文件比源文件要多一些东西的原因。
参考:
http://baike.baidu.com/view/656648.htm
http://math.hdu.edu.cn/?41/viewspace-37
This entry was posted on 星期六, 5 9 月, 2009 at 00:36 and is filed under C/C++. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.
Comments are closed.