GeekBand.重学C++(2)

2016-03-21  本文已影响0人  EthanZhang_

类间关系:组合/委托/继承

Composition 组合(has-a)

Composition Composition memory

Delegation 委托(Composition by reference)

Delegation Delegation memory

Inheritance 继承(is-a)

Inheritance Inheritance memory

Inheritance with virtual

Inheritance + Composition

上一篇下一篇

猜你喜欢

热点阅读