EOF是什么东西啊

诸葛不空城 2014-09-12 08:25:01
看到说文件尾有eof表示文件结束,这个eof是一个表示结束的字符还是就是表示一个读到头的信号
...全文
107 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
mujiok2003 2014-09-12
  • 打赏
  • 举报
回复
End-of-File It is a macro definition of type int that expands into a negative integral constant expression (generally, -1). It is used as the value returned by several functions in header <cstdio> to indicate that the End-of-File has been reached or to signal some other failure conditions. It is also used as the value to represent an invalid character. In C++, this macro corresponds to the value of char_traits<char>::eof().
brookmill 2014-09-12
  • 打赏
  • 举报
回复
文件里没有EOF这个东西,它不是表示结束的字符。就是一个信号,读取文件的函数发现文件结束了就会返回这么个值

69,382

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧