code>(-1),但不是从文件中读取的。这就是该功能告诉您即将结束的方式。而且因为-1在任何字符集中都不是有效字符,所以不会造成混淆。The C functions you're using return EOF (-1) but that wasn't read from the file. It's just the way the function tells you that you're reached the end. And because -1 isn't a valid character in any character set, there's no confusion. 这篇关于如何区分EOF字符和文件的实际结尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!