Discussion:
question about inheritance
(too old to reply)
Zikun Xu
2011-07-17 19:23:08 UTC
Permalink
is there a way to allow the function in parent class to call the
function in children class as helper function?
Jeremy Roman
2011-07-17 21:53:23 UTC
Permalink
Post by Zikun Xu
is there a way to allow the function in parent class to call the
function in children class as helper function?
Just declare the helper function as virtual in the base class. You can
now call it as you normally would, and the appropriate derived class
implementation will be used.
--
Jeremy Roman
Student, Computer Science
University of Waterloo
Continue reading on narkive:
Loading...