If the base member took different arguments than the derived-class member, there would be no way to call the derived function from a reference or pointer to the base type.
如果基类成员与派生类成员接受的实参不同,就没有办法通过基类类型的引用或指针调用派生类函数。
How can I use a private member variable in a non-member function, when the variable happens to be a pointer?
我如何能在非成员函数使用私有成员变量时,变量是指针?
How can I use a private member variable in a non-member function, when the variable happens to be a pointer?
我如何能在非成员函数使用私有成员变量时,变量是指针?
应用推荐