上一页 1 2 3 4 5 6 ··· 14 下一页
摘要: 将c++更改过的名字变回定义的名字 [root@lhx-node2 ~]# c++filt _Z3foob foo(bool) 读取二进制的文件 [lhx@lhx-master protobuf]$ od -A x -t x1z -v test 000000 0a 1e 0a 03 79 6c 6c 阅读全文
posted @ 2021-05-11 12:01 刘大侠GG_B 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 示例代码 #include <iostream> #include <memory> using namespace std; class base { public: ~base(){cout << "in ~base()" << endl;}; }; void fuc(base* pb) { c 阅读全文
posted @ 2021-04-21 13:44 刘大侠GG_B 阅读(89) 评论(0) 推荐(0) 编辑
摘要: share_ptr智能指针能够记录其实际的指向对象的类型,并正确的析构该对象。 所以使用share_ptr来管理的对象不需要虚析构函数 示例代码 #include <iostream> #include <memory> using namespace std; class base{ public 阅读全文
posted @ 2021-04-21 10:55 刘大侠GG_B 阅读(142) 评论(0) 推荐(0) 编辑
摘要: c语言实现国际化翻译 阅读全文
posted @ 2021-01-29 17:31 刘大侠GG_B 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 参考博客https://www.cnblogs.com/jiangzhaowei/p/4193283.html #include <signal.h> #include <errno.h> #include <pthread.h> #include <unistd.h> #include <sys/ 阅读全文
posted @ 2021-01-29 11:33 刘大侠GG_B 阅读(180) 评论(0) 推荐(0) 编辑
摘要: override var += -g #通过命令行传递的参数,不能覆盖var的值 sources = f1.c f2.c define hello @echo "test define" @echo "test define hello" endef test:foo $(call hello) # 阅读全文
posted @ 2021-01-28 15:42 刘大侠GG_B 阅读(79) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdarg.h> int foo(int flag, ...){ va_list ap; int value,test; if(flag == 1) { va_start(ap,flag); value=va_arg(ap,int); te 阅读全文
posted @ 2021-01-25 15:15 刘大侠GG_B 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 void (*p)(int); // <==>int a;变量的定义 3 void *f(int);//声明 4 5 void foo(int a) 6 { 7 printf("foo: %d\n", a); 8 } 9 10 int main() 11 阅读全文
posted @ 2021-01-21 15:37 刘大侠GG_B 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 因为initrd.img只是系统启动的一个虚拟磁盘而已,系统启动完成后就没有用处了,因此,我决定用busybox来完成一些必要的启动工作(用的是busybox-1.5.1,配置文件如下) cd /tmp mkdir initrd cd initrd mkdir dev proc sys lib mn 阅读全文
posted @ 2021-01-11 10:50 刘大侠GG_B 阅读(592) 评论(0) 推荐(0) 编辑
摘要: C语言解析命令行参数getopt() 【转】getopt(分析命令行参数) 相关函数表头文件 #include<unistd.h> 定义函数 int getopt(int argc,char * const argv[ ],const char * optstring); 函数说明 getopt() 阅读全文
posted @ 2020-12-21 14:08 刘大侠GG_B 阅读(216) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 14 下一页