How do I distinguish between an EOF character, and the actual end of file?

前端 未结 3 1191
无人及你
无人及你 2021-01-13 02:09

When reading a file, I understand the last character provided is an EOF. Now, what happens, when I have an EOF character in that file?

How do

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-13 02:16

    Assuming you're talking about C, EOF is -1, which is not a character (hence there is no confusion).

提交回复
热议问题