C++之多继承
来源:互联网 发布:黑客帝国3:矩阵革命mp4 编辑:程序博客网 时间:2024/06/05 08:43
#include <iostream>using namespace std ; class AA{public:int a ; void Say_hello(void){cout << "this is AA " << endl ; }};class BB{public:int b ; void Say_hello(void){cout << "this is BB " << endl ; }};//多继承 class CC : public AA , public BB{public:int d ; void Say_hello(void){cout << "this is CC " << endl ; }};int main(void){CC aa ; aa.Say_hello();aa.AA::Say_hello();aa.BB::Say_hello();aa.CC::Say_hello();cout << "Size AA : " << sizeof(AA) << endl ; cout << "Size BB : " << sizeof(BB) << endl ; cout << "Size CC : " << sizeof(CC) << endl ; }
运行结果:
1 0
- C++之多重继承
- lua 之多重继承
- C#之多继承
- c++之多继承
- c++之多继承
- C++之多重继承
- c++之多重继承
- C++之多继承
- C++之多重继承
- C++之多重继承
- Java之多继承
- C++之多继承
- 论C#之多继承
- cpp反汇编之多继承
- c++基础之多重继承
- C++继承之多重继承与虚基类
- c++远航之多继承与多重继承
- OOP之多态 【C#】
- linux shell 编程笔记 - 后台执行命令&
- Longest Palindromic Substring (Manacher Algorithm)
- hdu 4288 离线线段树+间隔求和
- SSL 1382 车 状压dp
- 工作日志
- C++之多继承
- 构造器、方法重载、继承、方法重写、自动转型、多态课堂笔记
- ab压力测试工具详解
- 经验分享从c到c++
- 盒子模型 制作三角形 圆形 导航
- traincascade相关结构体
- 关于tomcat中虚拟主机的设置,以及为同一个网站添加几个域名的方法
- mybatis中association的column传入多个参数值
- 排序算法-堆排序