我想在 C++ 中调用超类(父类)的继承函数。
这怎么可能?
class Patient{
protected:
char* name;
public:
void print() const;
}
class sickPatient: Patient{
char* diagnose;
void print() const;
}
void Patient:print() const
{
cout << name;
}
void sickPatient::print() const
{
inherited ??? // problem
cout << diagnose;
}