09 2019 档案
摘要:int* a = new int; const int* b = a; const int* a = new int; int* b = (int*)a; const int m = 10; int n = m; const int& p = m; int& q = (int&)p; 以上在vs20
阅读全文
摘要:笔试,面试中常考的C++虚拟继承的知识点 第一种情况: 第二种情况: 第三种情况 第四种情况:class a class a class a class a{ { { { virtual void func(); virtual void func(); virtual void func(); v
阅读全文
摘要:转自 https://blog.csdn.net/xiaxzhou/article/details/76576516 讲的很透彻,对于理解虚指针 类的成员函数: 总结:普通继承:子类不会出现新的虚函数表,而是把自己的虚函数放到父亲的虚函数表上 虚继承 :子类会出现一个vbptr 子类出现一个新的虚函
阅读全文
摘要:转自 https://blog.csdn.net/xiejingfa/article/details/48028491 主要用于理解c++类的内存模型 , 理解继承,虚继承的内存模型
阅读全文