运算符重载
Coordinate operator+(Coordinate c1,Coordinate c2)//我已经在类里声明友元了
//friend Coordinate operator+( Coordinate &c1, Coordinate &c2);
{
Coordinate temp(0,0);
temp.m_iX=c1.m_iX+c2.m_iX;
temp.m_iY=c1.m_iY+c2.m_iY;
return temp;//编译器提示我m_iX和m_iY是私有变量 不能访问
}