class ClassA { public: virtual ~ClassA(){}; virtual void FunctionA(){}; }; class ClassB { public: virtual void FunctionB(){}; }; class ClassC : public ClassA, public ClassB { public: }; ClassC aObject; ClassA *pA = &aObject; ClassB *pB = &aObject; ClassC *pC = &aObject;