#include<iostream>
#include<string>
using namespace std;
class Base {
public:
int m_A;
int m_B;
int m_C;
};
class Son :public Base
{
public:
int m_D;
};
void test01()
{
cout << "sizeof(son)= " << sizeof(Son) << endl;
}
int main()
{
test01();
}
开始菜单中打开命令提示符 ,观察继承中的对象模型
27行cl /d1