导读 您好,今天小花就为大家解答关于fseek函数一般用于什么文件,fseek函数返回值相信很多小伙伴还不知道,现在让我们一起来看看吧!1、首先,贴

您好,今天小花就为大家解答关于fseek函数一般用于什么文件,fseek函数返回值相信很多小伙伴还不知道,现在让我们一起来看看吧!

1、首先,贴上这几个函数的返回值 man内容 The rewind() function returns no value. Upon successful completion, fgetpos(), fseek(), fsetpos() return 0, and ftell() returns the current offset. Otherwise, -1 is returned and errno is set to indicate the error. 另外,fseek的第三个参数。

2、是否用对了 SEEK_SET, SEEK_CUR, SEEK_END 分别是距离开始位置、当前位置、结尾位置 的seek定位offset。

本文就讲到这里,希望大家会喜欢。