运算符重载的时候出错??
ostream &operator<<(ostream &out,Coordinate &coor)
{
out<<"("<<coor.m_iX<<","<<coor.m_iY<<")"<<endl;
return out;
}
--------------------Configuration: 栈 - Win32 Debug--------------------
Compiling...
Coordinate.cpp
G:\VC++ 6.0\MyProjects\栈\Coordinate.cpp(17) : error C2248: 'm_iX' : cannot access private member declared in class 'Coordinate'
g:\vc++ 6.0\myprojects\栈\coordinate.h(13) : see declaration of 'm_iX'
G:\VC++ 6.0\MyProjects\栈\Coordinate.cpp(17) : error C2248: 'm_iY' : cannot access private member declared in class 'Coordinate'
g:\vc++ 6.0\myprojects\栈\coordinate.h(14) : see declaration of 'm_iY'
执行 cl.exe 时出错.
栈.exe - 1 error(s), 0 warning(s)