class A { void methodToCall() {}; } class B { B() { subscribeToEvent(); } void eventHandler(Event* E) { call A::methodToCall() } } class C : public A, public B{ } This may seem like a rare situation so let me explain what I'm trying to do.
I have alot of classes that are like class A. These are generated by another framework so I do not have control over how they are generated.
For every class A I have one or more class C's that inherit a class like A.
I have developed the need to call A::MethodToCall() when eventHandler() is called. My goal is not to have to subscribe and provide an eventhadler method in all of my classes like class C.
I would much rather create a one class B that all my class C's can simply inherit.
My problem is I do not know how to make the call to class A from class B.
If there is a better way of doing this I'm open to it.