T
tony
Hi!
A derived class can override a method in the base class it inherits for,
and even my dog knows that. More incredibly, I know and understand it
too.
But, can a (of course virtual in this case) method be overriden in an
instance instead? For example, to provide some callbacks to a class.
Should I use virtual functions instead? How do I pass the this pointer
when casting it from or to in any useful way seems to break every C++
language rule? As a normal parameter? But then it doesn't really look
so OOP anymore.
Thanks a lot,
Tony
A derived class can override a method in the base class it inherits for,
and even my dog knows that. More incredibly, I know and understand it
too.
But, can a (of course virtual in this case) method be overriden in an
instance instead? For example, to provide some callbacks to a class.
Should I use virtual functions instead? How do I pass the this pointer
when casting it from or to in any useful way seems to break every C++
language rule? As a normal parameter? But then it doesn't really look
so OOP anymore.
Thanks a lot,
Tony