Coordinate(int x, int y)
{
m_iX = x;
m_iY = y;
}
void printInfo()
{
cout << '(' << m_iX << ',' << m_iY << ')' << endl;
}
int main(void)
{
Coordinate coorArr[2] = { Coordinate(1,2),Coordinate(3,4) };
for (int i = 0; i < 2; i++)
{
coorArr[i].printInfo();
}
return 0;
}
{
m_iX = x;
m_iY = y;
}
void printInfo()
{
cout << '(' << m_iX << ',' << m_iY << ')' << endl;
}
int main(void)
{
Coordinate coorArr[2] = { Coordinate(1,2),Coordinate(3,4) };
for (int i = 0; i < 2; i++)
{
coorArr[i].printInfo();
}
return 0;
}