Chinaunix首页 | 论坛 | 博客
  • 博客访问: 273191
  • 博文数量: 55
  • 博客积分: 2030
  • 博客等级: 大尉
  • 技术积分: 737
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-13 18:06
文章分类

全部博文(55)

文章存档

2011年(2)

2010年(7)

2009年(17)

2008年(29)

我的朋友

分类: C/C++

2008-09-13 05:08:07

Item[36]
Never redefine an inherited non-virtual function.
 
Item[37]
Never redefine an inherited default parameter value, because default parameter values are statically bound, while virtual functions — the only functions you should be overriding — are dynamically bound.
 
Item[38]
Some objects in your programs correspond to things in the world you are modeling, e.g., people, vehicles, video frames, etc. Such objects are part of the application domain. Other objects are purely implementation artifacts, e.g., buffers, mutexes, search trees, etc. These kinds of objects correspond to your software's implementation domain.
  • Composition has meanings completely different from that of public inheritance.

  • In the application domain, composition means has-a. In the implementation domain, it means is-implemented-in-terms-of.

阅读(791) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~