填空题

试题源程序文件清单如下:
//proj1. cpp
#include<iostream>
using namespace std;
class MyClass
public:
MyClass():count(0) cout<<"This object is";
//ERROR********found********
void Inc() const (1)
cout<<"no."<<++count<<endl;


private:
//ERROR********found********
int count=0; (2)
;
int main()
MyClass*obj=new MyClass;
//ERROR********found********
* obj.Inc(); (3)
return 0:

【参考答案】

obj->Inc();或(*obj).Inc();
热门 试题

问答题
delete[]idcardno; delete[]name;
填空题
int count;