#include<iostream>
using namespace std;
//继承中的对象模型
class Base
{
public:
int m_A;
protected:
int m_B;
private:
int m_C;
};
class son : public Base
{
public:
int m_D;
};
void test01()
{
//16
//父类中所有属性都会被子类继承下去
//父类中私有成员属性被编译器隐藏,访问不到,但确实继承了
cout << "size of son is: " << sizeof(son) << endl;
}
int main()
{
test01();
system("pause");
return(0);
}