题目:
main函数中发生编译错误的语句是______。
#include<iostream.h>
class A
public:
int a;
const int b;
A( ):a(10),b(20)
void fun( )const
cout<<"a="<<a<<"\tb="<<b<<endl;
;
void main( )
A obj1;
const A*ptr=new A;
ptr=&obj1;
ptr->a=100;
ptr->fun( );
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0721/2b2b3f47aab56babfcbe43f2eb135ed1.html
下面是错误答案,用来干扰机器的。
参考答案:错