I have the following structure:
class A{
public:
virtual void fn() = 0;
} ;
class B : public A{
public:
virtual void fn(){
//implB
}
} ;
class Base{
//whatever
} ;
class C : public Base,public B{
public:
virtual void fn(){
//implC
}
} ;
B* instance = new C();
(*instance).fn()
This seems to call implB and not implC. Is this normal?
I’d like to call implementation implC of fn, is there a way to do it?
You’re right, C::fn() is called when my example is ran alone. My problem actually was that I was dynamically loading this class (C) with ros:pluginlib (http://ros.org/wiki/pluginlib) so the multiple inheritance issue is probably coming from there. That’s a completly different issue I’ll have to look into.