上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 46 下一页

2020年2月7日

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 阅读(1321) 评论(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) 编辑

2020年2月6日

c tcp sockt server client -- demo

摘要: server.c // // Created by gxf on 2020/2/6. // #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <stdio.h> #include <unistd. 阅读全文

posted @ 2020-02-06 23:36 luckygxf 阅读(422) 评论(0) 推荐(0) 编辑

cmake编译多个文件

摘要: demo.h #ifndef UNTITLED_HEADER_DEMO_H #define UNTITLED_HEADER_DEMO_H void printHello(char *name); #endif //UNTITLED_HEADER_DEMO_H demo.c // // Created 阅读全文

posted @ 2020-02-06 22:20 luckygxf 阅读(941) 评论(0) 推荐(0) 编辑

在子线程中执行exit()会导致整个进程退出

摘要: // // Created by gxf on 2020/2/6. // #include <stdio.h> #include <pthread.h> #include <stdlib.h> #include <unistd.h> void printMsg(char *msg); int mai 阅读全文

posted @ 2020-02-06 18:01 luckygxf 阅读(2130) 评论(0) 推荐(0) 编辑

使用libxml2解析xml

摘要: book.xml <?xml version="1.0" encoding="UTF-8" ?> <books> <book2> <name id="1">c primer plus111</name> <author>unknow author</author> <date>unknow date 阅读全文

posted @ 2020-02-06 17:48 luckygxf 阅读(1368) 评论(0) 推荐(0) 编辑

2020年2月4日

c连接mysql -demo

摘要: 参考:https://blog.csdn.net/u012206617/article/details/88960215 1. 下载mysql c客户端:https://cdn.mysql.com/archives/mysql-connector-c/mysql-connector-c-6.1.11 阅读全文

posted @ 2020-02-04 20:41 luckygxf 阅读(426) 评论(0) 推荐(0) 编辑

clion redis-demo

摘要: 1. github hiredis安装 redis-demo.c #include <stdio.h> #include <stdlib.h> #include <hiredis.h> int main(int argc, char **argv) { // if (argc < 3) { // p 阅读全文

posted @ 2020-02-04 18:03 luckygxf 阅读(368) 评论(0) 推荐(0) 编辑

log4c demo

摘要: #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include "log4c.h" int main(int argc, char** argv){ int rc = 0; log4c_category_t* m 阅读全文

posted @ 2020-02-04 17:07 luckygxf 阅读(207) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 46 下一页

导航