- 博客(2)
- 收藏
- 关注
原创 Linux文件编程之光标移动
Linux文件编程之光标移动光标移动#include <sys/types.h>#include <unistd.h> //需要包含的头文件off_t lseek(int fd,off_t offset,int whence); //函数原型/*函数返回值是光标移动的偏移量fd:文件描述符offset:光标的偏移量,为正数时向后移动,为负数时前后移动whence:光标的位置 参数有:SEEK_SET:文件头、SEEK_END:文件尾、SEEK_CUR:当前位
2020-09-18 10:58:14 350
原创 Linux文件编程
Linux文件编程Linux文件编程主要分为以下几个步骤:打开/创建文件#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h> //需要包含的头文件int open (const char *pathname,int flags);int open (const char *pathname,int flags,mode_t mode);int creat (const char *pa
2020-09-17 21:01:40 74
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人