首页 > 代码库 > 类的地址

类的地址

#include<stdio.h>#include<iostream>#include<assert.h>using namespace std;class ClassA{public:    virtual ~ClassA(){};    virtual void FunctionA(){};};class ClassB{public:    virtual void FunctionB(){};};class ClassC:public ClassA,public ClassB{public:};int main(){    ClassC aObject;    ClassA* pa=&aObject;    ClassB* pb=&aObject;    ClassC* pc=&aObject;    cout<<pa<<endl;    cout<<pb<<endl;    cout<<pc<<endl;}

类的地址