摘要: 摘要:使用友元、私有构造函数、虚继承等方式可以使一个类不能被继承,可是为什么必须是虚继承?背后的原理又是什么?用C++实现一个不能被继承的类(例1) 1 #include 2 using namespace std; 3 4 template 5 class Base{ 6 frie... 阅读全文
posted @ 2014-10-05 09:15 YEQ 阅读(2052) 评论(0) 推荐(0) 编辑