派生类可以从基类中继承:
(1)基类中定义的每个数据成员(尽管这些数据成员在派生类中不一定可以被访问);
(2)基类中的每个普通成员函数(尽管这些成员函数在派生类中不一定可以被访问);
(3)The same initial data layout as the base class;
(4)基类中的static成员函数;
派生类无法从基类中继承:
(1)基类的构造函数和析构函数;
(2)基类的友元;
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
转载请注明:http://www.cnblogs.com/iloveyouforever/
2013-11-26 19:46:23