请问这个代码的错误要怎么改啊,我怎么改都不对

img

#include
using namespace std;

class Test{
int x,y;
public:
void Test(int i,int j){
x=i;
y=j;
}
void show();
}
void show(){
cout<<"x="<
}
void main(){
Test a;
a.show();
Test b(1);
b.show();
Test c(2,4);
c.show();
}

Test是构造函数,前面不需要void
外部函数实现时,需要加类域名: void Test::show()
main里有Test a,所以Test类必须有无参构造函数才行
还有Test b(1),一个参数的构造函数,修改如下:

class Test{
int x,y;
public:
Test(int i=0,int j=0){
x=i;
y=j;
}
void show();
}
void Test::show(){
cout<<"x="<<x<<",y="<<y<<endl;
}

void main(){
Test a;
a.show();
Test b(1);
b.show();
Test c(2,4);
c.show();
}