How do I call the parent function from a derived class using C++? For example, I have a class called parent
, and a class called child
which is derived from parent. Within
each class there is a print
function. In the definition of the child's print function I would like to make a call to the parents print function. How would I go about doing this?
转载于:https://stackoverflow.com/questions/357307/how-to-call-a-parent-class-function-from-derived-class-function