定义对象数组要初始化对象。
Coordinate *coorArr[2];
coorArr[0].m_iX = 1;
coorArr[0].m_iY = 2;
coorArr[1].m_iX = 3;
coorArr[1].m_iY = 4;
Coordinate *coorArr[2];
coorArr[0].m_iX = 1;
coorArr[0].m_iY = 2;
coorArr[1].m_iX = 3;
coorArr[1].m_iY = 4;
void printInfo()
{
cout<<"("<<m_iX<<","<<m_iY<<")"<<endl;
}
{
cout<<"("<<m_iX<<","<<m_iY<<")"<<endl;
}