摘要:
将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 阅读全文
摘要:
示例代码 #include <iostream> #include <memory> using namespace std; class base { public: ~base(){cout << "in ~base()" << endl;}; }; void fuc(base* pb) { c 阅读全文
摘要:
share_ptr智能指针能够记录其实际的指向对象的类型,并正确的析构该对象。 所以使用share_ptr来管理的对象不需要虚析构函数 示例代码 #include <iostream> #include <memory> using namespace std; class base{ public 阅读全文
摘要:
c语言实现国际化翻译 阅读全文
摘要:
参考博客https://www.cnblogs.com/jiangzhaowei/p/4193283.html #include <signal.h> #include <errno.h> #include <pthread.h> #include <unistd.h> #include <sys/ 阅读全文
摘要:
override var += -g #通过命令行传递的参数,不能覆盖var的值 sources = f1.c f2.c define hello @echo "test define" @echo "test define hello" endef test:foo $(call hello) # 阅读全文
摘要:
#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 阅读全文
摘要:
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 阅读全文
摘要:
因为initrd.img只是系统启动的一个虚拟磁盘而已,系统启动完成后就没有用处了,因此,我决定用busybox来完成一些必要的启动工作(用的是busybox-1.5.1,配置文件如下) cd /tmp mkdir initrd cd initrd mkdir dev proc sys lib mn 阅读全文
摘要:
C语言解析命令行参数getopt() 【转】getopt(分析命令行参数) 相关函数表头文件 #include<unistd.h> 定义函数 int getopt(int argc,char * const argv[ ],const char * optstring); 函数说明 getopt() 阅读全文