c++菜鸟请问大神

c++初学者请教大神
#include <iostream>
using namespace std;
class complex
{
double real,imag;
public:
complex(double r=0,double i=0)
{
real=r;
imag=i;
}
complex add(double x){return complex(x+ real,imag);}
complex add(complex c){return complex(real+c.real,imag+c.imag);}
void display(){cout<<real<<"+"<<imag<<"i"<<endl;}
double getreal(){return real;}
double getimag(){return imag;}
};
complex add(double r,complex c)
{
return complex(r+c.getreal(),c.getimag());
}
complex add(complex c1,complex c2)
{
return(c1.getreal()+c2.getreal(),c1.getimag()+c2.getimag());
}
void main()
{
complex c1(2,3),c2(5,6),c3;
c3=add(c1,c2);
c3.display();

}



输出为
9+0i
请按任意键继续. . .

错误在哪里?
c++

------解决方案--------------------
complex add(complex c1,complex c2)
{
return(c1.getreal()+c2.getreal(),c1.getimag()+c2.getimag());
}
很显眼的错误啊= =应该是return complex(c1.getreal()+c2.getreal(),c1.getimag()+c2.getimag());