[求助]请教大虾输入输出重载的问题
偶有一程序不知道问题在哪 请诸位帮我检查检查 #include<iostream.h> class complex { double mX,mY; public: complex(double vx=0,double vy=0) {mX=vx;mY=vy;} friend ostream& operator<<(ostream&,complex&); friend istream& operator>>(istream&,complex&); }; ostream& operator <<(ostream& output,complex& c) { output<<"c.mX"<<"+"<<c.mY<<"i"<<endl; return output;
}
istream& operator >>(istream& iutput,complex& c) { cout<<"input mX and mY:"; input>>c.mX>>c.mY; return input;
} void main() { complex c1(1,2 ; cout<<c2; }