河南成教 / C++程序设计
7[完成题]
7[完成题]
在下面程序横线处填上适当的内容,使该程序输出结果为:
Creating B
end of B
end of A
程序如下:
#include
class A
{
public:
A(){}
virtual ~A() {cout<<″end of A″<<>< p="">
};
calss B:public A
{
public:
B(){________}
~B(){cout<<″end of B″<<>< p="">
};
void main()
{
A*pa=new B;
delete pa
}
参考答案:
佳题速递: