有三个origin常量,你可以像使用功能fseek,从您的判断offset数:SEEK_SET,SEEK_CUR,和SEEK_END。SEEK_CUR并且SEEK_END似乎不言自明地表示文件流的当前位置和结尾,但为什么SEEK_SET用来表示开始?为什么不是这样的SEEK_BEG?
因为您可以添加偏移量。通过使用SEEK_SET,您可以显式设置偏移量。(通过将其添加到开头)
从 fseek 的联机帮助页:
The new position, measured in bytes, is
obtained by adding offset bytes to the position specified by whence.
If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is
relative to the start of the file, the current position indicator, or
end-of-file, respectively.
从 lseek 的联机帮助页:
   SEEK_SET
          The file offset is set to offset bytes.
   SEEK_CUR
          The file offset is set to its current location plus offset
          bytes.
   SEEK_END
          The file offset is set to the size of the file plus offset
          bytes.