I have the following code involving three classes A,B,C File A.pp does not compile with error 'ambigous call' on the call to inheriTed method doWhat() Which is the cause of the problem? How do I avoid it?
A.h
#include "B.h
class A: public B, C{
virtual void doThings(C* c);
}
A.cpp
void doThings(C* c){
this->doWhat(); //Compilation Error doWhat call is ambigous!
}
B.h
class C; //forward declaration
class B{
public:
virtual void doThings(C* c) = 0;
}
C.h
#include "B.h"
class C{
public:
virtual void doStuff(B* b);
virtual void doWhat();
}