fseek

int fseek(FILE *stream, long offset, int fromwhere);函数设置文件指针stream的位置。
如果执行成功,stream将指向以fromwhere为基准,偏移offset(指针偏移量)个字节的位置,函数返回0。如果执行失败(比如offset超过文件自身大小),则不改变stream指向的位置,函数返回一个非0值。

posted @ 2017-04-17 10:18  半醉人间帅  阅读(78)  评论(0编辑  收藏  举报