【正确答案】正确答案:(1)添加语句:public: (2)TestClass(){cout<<"init TestClass" <
【答案解析】解析:(1)打开modi1.cpp,调试程序,显示错误提示为第一标识下“modi1.cpp(13):errorC2248:'TestClass::TestClass':cannot access privatemember declared in class'TestClass'”,构造函数由于是私有的,无法获得,所以应该定义为public型,即第1个标识下添加“public:”。 (2)构造函数首部的一般形式为:构造函数名(形参列表),构造函数没有返回值,所以定义构造函数时不需要声明类型,所以“int TestClass(){cout<<"init TestClass"<