V
Vulcan
<code>
class Base {
};
class Class1 : public Base{
public:
void Function1();
}
void Tracker(Base b, void (Base::*callback)());
int main(){
Class1 o1;
Tracker(&o1, &Class1::Function1);
}
</code>
The above code doesn't work because Function1 is only declared in the
derived class. Is there a way around this? I want to be able to have a
member function of a derived class as callback.
class Base {
};
class Class1 : public Base{
public:
void Function1();
}
void Tracker(Base b, void (Base::*callback)());
int main(){
Class1 o1;
Tracker(&o1, &Class1::Function1);
}
</code>
The above code doesn't work because Function1 is only declared in the
derived class. Is there a way around this? I want to be able to have a
member function of a derived class as callback.