您的位置:首页 > 编程语言 > C语言/C++

C++箴言:接口继承和实现继承

2009-03-12 13:20 218 查看
 

Things to Remember

  ·Inheritance of interface(接口继承)与 inheritance of implementation(实现继承)不同。在 public inheritance(公开继承)下,derived classes(派生类)总是继承 base class interfaces(基类接口)。

  ·Pure virtual functions(纯虚拟函数)指定 inheritance of interface only(仅有接口被继承)。

  ·Simple (impure) virtual functions(简单虚拟函数)指定 inheritance of interface(接口继承)加上 inheritance of a default implementation(缺省实现继承)。

  ·Non-virtual functions(非虚拟函数)指定 inheritance of interface(接口继承)加上 inheritance of a mandatory implementation(强制实现继承)。
本文章转载自『
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: