INTERNAL COMPILER ERROR 怎么改
#include <iostream>
using namespace std;
class complex{
public:
complex(double r=0.0,double i=0.0){
real=r;
image=i;}
friend complex operator+( const complex &c1,const complex &c2);
private:
double real;
double image;
};
complex operator+( const complex &c1,const complex &c2);{
real=c1.real+c2.real;
image=c1.image+c2.image;
return complex(real,image);}
int main(){
complex c3,c4,c5;
c3(1.0,2.0);
c4(2.0,3.0);
cout<<"c3="<<c3<<endl;
cout<<"c4="<<c4<<endl;
c5=c3+c4;
cout<<"c3+c4="<<c5<<endl;
c3(1.0);
c4(2.0,3.0);
cout<<"c3="<<c3<<endl;
cout<<"c4="<<c4<<endl;
c5=c3+c4;
cout<<"c3+c4="<<c5<<endl;
c3(1.0,2.0);
c4(2.0);
cout<<"c3="<<c3<<endl;
cout<<"c4="<<c4<<endl;
c5=c3+c4;
cout<<"c3+c4="<<c5<<endl;
return 0;}