What is “short item count” in fread()?

穿精又带淫゛_ 提交于 2019-11-30 13:39:53

If you want 4, and you have 3, then you're short 1.

The meaning of "short" in fread man page does not refer to a data type.

"Short" in this case means "less then expected". If fread() expected to read 4 objects, but only read 3, it will return the value 3.

I believe that the the man page should be re-written to say: "If an error occurs, or the end-of-file is reached, the return value is the number of items successfully read or written up until the error or EOF occurred.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!