-
清华大学郑莉编著的C++课后习题答案
资源介绍
#include
class BaseClass {
public:
virtual ~BaseClass() {
cout << "~BaseClass()" << endl;
}
};
class DerivedClass : public BaseClass {
public:
~DerivedClass() {
cout << "~DerivedClass()" << endl;
}
};
void main()
{
BaseClass* bp = new DerivedClass;
delete bp;
}
- 上一篇: 百度小程序开发资源汇总
- 下一篇: 哈尔滨工程大学随机过程课后答案