问题
单项选择题
有如下程序:
#include<iostream>
#include<cstring>
using namespace std;
class XCF{
int a;
public:
XCF(int aa=0):a(aa) { cout<<"1";}
XCF(XCF&x){ a=x.a;cout<<"2";)
~XCF( ){ cout<<a;}
int Geta( ){ return a;}
};
int main( ){
XCF d1(5),d2(d1);
XCF*pd=new XCF(8);
cout<<pd->Geta( );
delete pd;
return 0;
}
运行时的输出结果是()
A.1215588
B.1218855
C.12185
D.128512
答案
参考答案:B