I have two very different interfaces, A and B that have a single pure virtual function in common. Some objects are inheriting from both A and B. The problem is A is usually inherited a level above B and its pure virtual is defined there, meaning on the object which inherits B cannot find the definition.
Is there a way to 'show' B that the function is defined just not within its current scope?
class A{
public:
virtualint Get() = 0;
};
class B{
public:
virtualint Get() = 0;
};
class C : public A{
public:
C(){ _c = 5; }
virtualint Get(){ return _c; }
protected:
int _c;
};
class D public C, public A{
// what would go here to show B that C::Get() is defined?
};
int main()
{
D test;
return 0;
};