C++中的类对象指针的向上转换问题

来源:互联网 发布:剑网三脸型数据清洗 编辑:程序博客网 时间:2024/06/07 07:16

先贴代码:

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;}
下面是反汇编的分析结果表:

下面的图是对堆栈的分析: