摘要: #include <iostream> #include <vector> #include <string.h> using namespace std; class CTest { public: CTest() { cout << "CTest construct" << endl; data 阅读全文
posted @ 2019-06-13 19:43 Aotle 阅读(2132) 评论(1) 推荐(0)
摘要: 转载:https://blog.csdn.net/Hackbuteer1/article/details/7558868 首先:强调一个概念定义一个函数为虚函数,不代表函数为不被实现的函数。定义他为虚函数是为了允许用基类的指针来调用子类的这个函数。定义一个函数为纯虚函数,才代表函数没有被实现。定义纯 阅读全文
posted @ 2019-06-12 20:56 Aotle 阅读(2652) 评论(0) 推荐(0)
摘要: 转载:https://originlee.com/2016/05/01/eval-expression-in-c-and-cpp/ 前几日,一个刚学编程的老朋友问了我一个问题: int i = 0;i = i ++;printf(“%d\n”, i); 为什么打印i的值是1而不是0? 这种undef 阅读全文
posted @ 2019-06-12 19:03 Aotle 阅读(2008) 评论(0) 推荐(0)
摘要: 转载:http://blog.csdn.net/walkinginthewind/article/details/7044380 C语言中数组和指针是一种很特别的关系,首先本质上肯定是不同的,本文从各个角度论述数组和指针。 一、数组与指针的关系 数组和指针是两种不同的类型,数组具有确定数量的元素,而 阅读全文
posted @ 2019-06-11 21:32 Aotle 阅读(3593) 评论(0) 推荐(0)
摘要: 转载 :https://blog.csdn.net/wu_nan_nan/article/details/51741030 作者:吴一奇 1. 指针1.1 一个指针包含两方面:a) 地址值;b) 所指向的数据类型。 1.2 解引用操作符(dereference operator)会根据指针当前的地址 阅读全文
posted @ 2019-06-11 19:58 Aotle 阅读(1617) 评论(0) 推荐(0)