虚继承
class person
{
public:
int a;
};
class son1: virtual public person
{
};
class son2: virtual public person
{
};
class son: public son1,public son2
{
};
sizeof(虚基类) = 4
sizeof(son1) = 4+4(vbptr指针)
sizeof(son2) = 4+4(vbptr指针)
sizeof(son) = 4+4(son1vbptr指针)+4(son2vbptr指针)