class B1
{
public:
virtual void foo1(void) { }
protected:
int m_b1;
};
class B2
{
public:
virtual void foo2(void) { }
protected:
int m_b2;
};
class D : public B1, public B2
{
public:
virtual void foo3(void) { }
protected:
int m_b3;
};
D d;
D* src = &d;
B2* dst = static_cast<B2*>(src);
|