c++ multiple inheritance casting
问题 I have a class: class Base; Also I have an interface class Interface; Next i'm creating a class class Derived : public Base, public Interface; If I have Base *object = new Derived; How can i cast object to Interface ? (of course if i know than object is actually a derived class) EDIT: I've tried dynamic_cast and static_cast (not compiled). So let me explain the problem a bit more: I have: class Object {...} class ITouchResponder { public: virtual bool onTouchBegan(XTouch *touch) = 0; virtual