1.  >>  高等继续教育 / 面向对象程序设计
 高等继续教育 / 面向对象程序设计
正确率:推荐%

题型描述: 简答题

写出下面程序的执行结果:


#include<iostream>

using namespace std;

class AA{


int a;


public :


AA(int i){a=i;cout<<"AA="<<a<<"
";}


virtual ~AA( ){cout<<"~AA="<<a<<"
";}


};


class BB:public AA{


int b;


public :


BB(int i,int j):AA(i){b=j;cout<<"BB="<<b<<"
";}


~BB( ){cout<<"~BB="<<b<<"
";}


};


int  main( )


{AA *pa=new AA(8);  delete pa;


AA*pb=new  BB(6,9);  delete pb;

 return 0;

}


 参考答案:
 佳题速递: