Dip*_*Sen 2 c++ constructor multiple-inheritance copy-constructor
如何编写具有多重继承的复制构造函数?
B1并且B2是继承了D存在继承链中没有金刚钻.我需要编写一个复制构造函数,D以便它调用B1和的复制构造函数B2
B1
B2
D
我想避免在clone()这里写一篇文章
clone()
Luc*_*ore 5
经典方法有什么问题:
D(const D& other) : B1(other), B2(other) { }
?
归档时间:
13 年,8 月 前
查看次数:
1254 次
最近记录:
10 年,10 月 前