运行后出现undefined reference to `operator<<(std::ostream&, Coordinate&)'的错误
----------遍历函数-----------------------------------------
template<typename T>
void MyStack<T>::stackTraverse(bool Transform)
{
if(Transform)
{
for(int i = 0; i < m_iTop; i++)
{
cout<<m_pBuffer[i];
//m_pBuffer[i].printCoordinate();
}
}
else
{
for(int i = m_iTop-1; i >= 0; i--)
{
cout<<m_pBuffer[i];
//m_pBuffer[i].printCoordinate();
}
}
cout<<endl;
}
------------重载-------------------------
ostream& operator<<(ostream &out, Coordinate &coor)
{
out<<"<"<<coor.m_iX<<","<<coor.m_iY<<">"<<endl;
return out;
}