求解!帮忙看一下!谢谢了~~~~~~~~~~~~~~~~~~
#include<iostream.h>class base
{ public:
int x,y,z;
int init(int x,int y){z=x*2-y;return x,y,z;}
getx(){return x;}
gety(){return y;}
print(){cout<<"2*"<<x<<"-"<<y<<"="<<z<<endl;}
};
void main()
{
base a;
a.init(68,55);
a.print();
}
显示结果要求是:2*68-55=81
但结果不是,这个X,Y的值怎么不对!我哪里没做好???谢谢了~!