class Array2D
{
private:
int* m_array;
int m_sizeX;
int m_sizeY;
public:
Array2D(int sizeX, int sizeY) : m_sizeX(sizeX), m_sizeY(sizeY)
{
m_array = new int[sizeX*sizeY];
}
~Array2D()
{
delete[] m_array;
}
int & at(int x, int y)
{
return m_array[y*sizeX + x];
}
};