使用VC6打开考生文件夹下的工程RevProj11。此工程包含一个源程序文件RevMain11.cpp,但在源程序文件中有错误。请改正程序中的错误,使它能得到正确结果。 注意,不得删行或增行,也不得更改程序的结构。 源程序文件RevMainll.cpp中的程序清单如下: //RevMainll.cpp #include<iostream> using namespace std; class point
private: const int color; int x; int y; public: point(int x,int y,int c)
this->x=x; this->y=y; color=c;
void show()
cout<<"x="<<x<<",y="<<y<<",color="<<color<<end1;
; int main()
const point p(10,10,100); p.show(); return 0;
【参考答案】
正确的程序代码如下: #include<iostream> using namespace std;......