填空题

main函数中发生编译错误的语句是 【12】 。 # include <iostream. h> class A { public: int a; const int b: A() :a(10) ,b(20) { void fun() const { cout<<"a="<<a<<"\tb="<<b<<end1; } }; void main( ) A obj1; const A * ptr = new A: ptr = &obj1; ptr->a=lO0; ptr->fun(), }

【参考答案】

ptr->a=100;