fseek vs rewind?

こ雲淡風輕ζ 提交于 2019-11-28 08:21:48

They are basically two different ways to accomplish the same thing: set the pointer to the beginning of the file. The only difference is that rewind also clears the error indicator.

If given the choice, you should use fseek. This is because rewind doesn't return an integer indicating whether the operation has succeeded.

If fseek() returns success, it will also clear the end-of-file indicator, whereas rewind() does not do so

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