问答题 面向对象程序设计纠错题:指出下面程序错误的地方:#include <iostream.h>class Test {private:int x,y=20;public:Test(int i,int j){x=i,y=j;}int getx(){return x;}int gety(){return y;}};void main(){Test mt(10,20);cout<<mt.getx()<<endl;cout<<mt.gety()<<e

成人教育远程网络教育函授网上考试【面向对象程序设计】课程在线考试模拟试题正确答案解析,免费查看【面向对象程序设计】作业答案。
题目内容:
面向对象程序设计纠错题:指出下面程序错误的地方:#include <iostream.h>class Test {private:int x,y=20;public:Test(int i,int j){x=i,y=j;}int getx(){return x;}int gety(){return y;}};void main(){Test mt(10,20);cout<<mt.getx()<<endl;cout<<mt.gety()<<endl;}
题目选项
纠错题:指出下面程序错误的地方:#include <iostream.h>class Test {private:int x,y=20;public:Test(int i,int j){x=i,y=j;}int getx(){return x;}int gety(){return y;}};void main(){Test mt(10,20);cout<<mt.getx()<<endl;cout<<mt.gety()<<endl;}
参考答案价值:100%
已邀请:
参考答案: 要查看答案请先登录或注册

要回复问题请先登录或注册