先贴代码:
class Point2d{
public:
protected:
float _x, _y;
};
class Point3d:public Point2d{
public:
protected:
float _z;
};
class Vertex{
public:
protected:
Vertex *next;
};
class Vertex3d:public Point3d, public Vertex{
public:
protected:
float mumble;
};
int _tmain(int argc, _TCHAR* argv[])
{
Vertex3d *pv3 = new Vertex3d;
Vertex* pv2 = pv3;//主要分析该行代码
int i = 0;
}
下面是反汇编的分析结果表:
下面的图是对堆栈的分析: