I have a base virtual class who needs to be derived from two classes, who need to be BOTH derived from a single class.
Example code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
class Base {
virtual ~Base(){}
};
class DerivedA : public Base {
virtual ~DerivedA(){}
};
class DerivedB : public Base {
virtual ~DerivedB(){}
};
class FinalClass : public DerivedA, DerivedB {
virtual ~FinalClass(){}
};
Should I expect this to work?
What's the correct way otherwise?