常规继承类对象大小
这个相对简单,只需要考虑类对象大小的累加和内存对齐
#include<iostream>
using namespace std;
class Base {
public:
int ma;
int mb;
char mc;
};
class Derive :public Base
{
public:
int md;
};
class Derive2 :public Derive
{
public:
int me;
};
int main()
{
return 0;
}