Chinaunix首页 | 论坛 | 博客
  • 博客访问: 12753
  • 博文数量: 13
  • 博客积分: 475
  • 博客等级: 下士
  • 技术积分: 125
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-09 11:20
文章分类

全部博文(13)

文章存档

2012年(4)

2010年(9)

我的朋友

分类:

2010-09-17 00:26:21

If a class is derived using private or protected inheritance, then user code may not convert an object of derived type to a base type object.

why?

Because when using private or protected inheritance, access to the members of the base part of the derived object may become more restrictive than the base type(e.g., from public to protected). And access can become more restrictive, but cannot become more general.
阅读(435) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~