题目内容:
使用VC++6.0打开考生文件夹下的源程序文件1.cpp,使其输出结果为: n=0
注意:不要改动main函数,不能增加或删除行,也不能更改程序的结构,错误的语句在//******error******的下面。
试题程序:
#include<iostream.h>
//********error*******。
classTC()
{
public:
//********error********
void~TC(){}
TC(intn)
{
cout<<'n'<<'='<<n<<endl;
};
//********error********
}
voidmain()
{
TCtest(0);
return;
}
参考答案:
答案解析: