
C++
放飞自己2016
学习如逆水行舟,不进则退
展开
-
C++中虚析构函数的作用
本文转载自:http://blog.youkuaiyun.com/starlee/article/details/619827我们知道,用C++开发的时候,用来做基类的类的析构函数一般都是虚函数。可是,为什么要这样做呢?下面用一个小例子来说明: 有下面的两个类:class ClxBase{public: ClxBase() {}; virtua转载 2016-01-13 10:51:02 · 351 阅读 · 0 评论 -
关于warning: deprecated conversion from string constant to ‘char*’
本文转载自:http://blog.sina.com.cn/s/blog_5e77c61f010104dt.htmlC++ 代码里面:class person{char name[20];public:setName(char* name){this->name=name;}}当在main函数中:setName("sujuan"),时就会转载 2016-08-24 15:03:07 · 880 阅读 · 0 评论 -
void value not ignored as it ought to be
本文转载自:http://blog.youkuaiyun.com/hjs1122/article/details/6163629gcc中出现了“void value not ignored as it ought to be”错误,原因是你使用的一个函数的返回值类型是void,而你有对它进行了赋值处理。例如:int ret;ret=unregister_chrdev(MAJOR转载 2016-08-24 16:12:48 · 1017 阅读 · 0 评论 -
a label can only be part of a statement and a declaration is not a statement
本文转自:http://www.cnblogs.com/lovevivi/archive/2012/11/06/2756374.htmlGCC:error: a label can only be part of a statement and a declaration is not a statement switch(a){ swtch(a){cas转载 2016-11-22 15:52:02 · 520 阅读 · 0 评论 -
Makefile 编译动态库文件及链接动态库
原文转自 :http://www.cnblogs.com/ljtknowns/p/5647793.html文件目录结构如下1 dynamiclibapp.c2 Makefile3 comm/inc/apue.h4 comm/errorhandle.c5 dynamiclib/Makefile6 dynamiclib/dynamiclib_add.c7 d转载 2017-12-05 22:10:30 · 33266 阅读 · 4 评论