计算机语言与算法
flyztech
这个作者很懒,什么都没留下…
展开
-
C语言文件操作lseek
相关函数:dup, open, fseek头文件:#include #include 定义函数:off_t lseek(int fildes, off_t offset, int whence);函数说明:每一个已打开的文件都有一个读写位置, 当打开文件时通常其读写位置是指向文件开头, 若是以附加的方式打开文件(如O_APPEND), 则读写位置会指向文件尾. 当read()或write(原创 2017-06-10 23:36:28 · 879 阅读 · 0 评论 -
多线程编程之pthread_create pthread_join pthread_attr_t
多线程编程之pthread_create函数应用 pthread_create函数 函数简介 pthread_create是UNIX环境创建线程函数 头文件 #include 函数声明 int pthread_create(pthread_t *thread, pthread_attr_t *attr, void* (*start_rou原创 2017-06-22 18:37:22 · 4727 阅读 · 1 评论 -
回调函数测试
#include //callback func /* void callback_func(){ printf("-------callback func"); } void testcall(void (*callback)()){ callback(); } int main(int argc, char* argv[]){原创 2017-06-23 16:55:24 · 434 阅读 · 0 评论