刚刚写的代码,有一处错,求帮助

刚写的代码,有一处错,求帮助
直接贴代码
#include <iostream>
using namespace std;
class FS
{
private: 
float sb;
float xb;
public:
FS();
FS(float shibu );
FS(float shibu, float xubu );
~FS();
void Input();
void Setsb( float x );
void Setxb( float x );

friend FS operator +(const FS& a, const FS& b );
friend FS operator - (const FS& a,const  FS& b );
friend FS operator * (const FS& a, const FS& b );
friend FS operator / (const FS& a, const FS& b );
friend ostream operator << ( ostream & out, const FS& X );

};

int main()
{
FS A;
cout<<"复数A为:"<<A<<endl;
FS B(3.4);
cout<<"复数B为:"<<B<<endl;
FS C(3.2,5.4);
cout<<"复数C为:"<<C<<endl;
cout<<"设置复数A的实部:";
A.Setsb(2.9);
cout<<"设置复数A的虚部:";
A.Setxb(2.1);
cout<<"复数A为:"<<A<<endl;
cout<<"请输入复数D:";
FS D;
D.Input();
cout<<"复数D为:"<<D<<endl;
cout<<"A加D为:"<<A+D<<endl;
cout<<"A减D为:"<<A-D<<endl;
cout<<"A乘以D为:"<<A*D<<endl;
cout<<"A除以D为:"<<A/D<<endl;
system("pause");
return 0;
}

FS::FS()
{
sb=xb=0;
}

FS::FS(float shibu )
{
sb=shibu;
xb=0;
}

FS::FS(float shibu, float xubu )
{
sb=shibu;
xb=xubu;
}

FS::~FS()
{
}

void FS:: Input()
{
float X1, X2;
cout<<"请输入实部:";
cin>>X1;
sb=X1;
cout<<"请输入虚部:";
cin>>X2;
xb=X2;
}

void FS:: Setsb( float x )
{
sb=x;
}

void FS:: Setxb ( float x )
{
xb=x;
}

FS operator + (const FS& a, const FS& b )
{
FS c;
c.sb = a.sb+b.sb;
c.xb = a.xb + b.xb;
return c;
}

FS operator - ( const FS& a, const FS&  b )
{
FS c;
c.sb= a.sb-b.sb;
c.xb = a.xb - b.xb;
return c;
}

FS operator * ( const FS& a, const FS& b )
{
FS c;
c.sb=(a.sb*b.sb)-(a.xb*b.xb); //ac-bd
c.xb=(a.sb*b.xb)+(a.xb*b.sb);
return c;
}

FS operator /( const FS& a, const FS& b )
{
FS c;
c.sb=( (a.sb*b.sb)+(a.xb*b.xb) )/(b.sb*b.sb + b.xb*b.xb);
c.xb=( (a.xb*b.sb) - (a.sb*b.xb) ) / (b.sb*b.sb + b.xb*b.xb) ;
return c;
}

 ostream operator << ( ostream & out, const FS& X )
{
  if(X.xb>0)
  cout<<X.sb<<"+"<<X.xb<<"i";
  else
  cout<<X.sb<<X.xb;
  cout<<endl;
  return out;
 }


倒数第二行return out; 提示错误,看不懂那个错误。。。。
------解决思路----------------------
最后一个方法的返回值错了,应该返回的是ostream的引用。
 ostream& operator << ( ostream & out, const FS& X )
{
  if(X.xb>0)
      cout<<X.sb<<"+"<<X.xb<<"i";
  else
      cout<<X.sb<<X.xb;
  cout<<endl;
  return out;
 }