除了教科书上的例子--在现实世界中--在C++中使用多重继承(其中多个基类不是纯接口)有意义吗?
发布于 2010-02-23 12:59:58
例如,在使用Policy-based design时,这是非常常见的。
发布于 2010-02-23 12:45:04
最容易指出的是iostream,它继承自istream和ostream。cin和cout分别是istream和ostream,但fstream派生自iostream。
发布于 2010-02-23 12:50:09
微软的ATL (活动模板库)使用多重继承作为混合类:
http://en.wikipedia.org/wiki/Active_Template_Library
https://stackoverflow.com/questions/2316148
复制相似问题