不对。 under public inheritance, the original properties will not be changed. public members will still be public; protected members will still be protected; private members will still be private.
private member of the base class is not a member in the derived class, so there is no such saying "private members will still be private."
【在 w*****n 的大作中提到】 : 不对。 : under public inheritance, the original properties will not be changed. : public members will still be public; : protected members will still be protected; : private members will still be private. : : 如果用public的话,base class的所有public 和 protected member都被继承为 : derived class的public member。 但是base的private member没法继承。。 : 这个理解对不??
h*o
7 楼
no,no it is a member, but not immediately accessible from the derived class.
【在 c*********n 的大作中提到】 : private member of the base class is not a member in the derived class, so : there is no such saying "private members will still be private."