2020年2月7日

c udp server client demo

摘要: server.c // // Created by gxf on 2020/2/7. // #include <stdio.h> #include <sys/socket.h> #include <arpa/inet.h> #include <stdlib.h> #define BUFFSIZE 1 阅读全文

posted @ 2020-02-07 22:42 luckygxf 阅读(548) 评论(0) 推荐(0) 编辑

c获取时间

摘要: 1. 获取时间戳gettimeofday(struct timeval*tv,struct timezone *tz) 2. time(time_t *t)获取日期 #include <stdio.h> #include <sys/time.h> #include <unistd.h> #inclu 阅读全文

posted @ 2020-02-07 21:44 luckygxf 阅读(587) 评论(0) 推荐(0) 编辑

c memcpy函数

摘要: void *memcpy(void *dest, void *src, unsigned n); string.h 返回值:dest*地址 功能:拷贝src n个字节到dest指向的内存 #include <stdio.h> #include <stdlib.h> #include <string. 阅读全文

posted @ 2020-02-07 15:54 luckygxf 阅读(297) 评论(0) 推荐(0) 编辑

c语言执行命令

摘要: 1. system函数 2. popen函数 #include <stdio.h> #include <stdlib.h> #define BUFFSIZE 1024 typedef struct info { char pid[20]; char user[20]; } topInfo; int 阅读全文

posted @ 2020-02-07 15:41 luckygxf 阅读(1318) 评论(0) 推荐(0) 编辑

c线程传递多个参数,使用结构体

摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <unistd.h> #include "header-demo.h" void display(void *couple 阅读全文

posted @ 2020-02-07 00:46 luckygxf 阅读(809) 评论(0) 推荐(0) 编辑

导航