#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; }
时间: 2024-10-25 21:48:56