I am attempting to create a grid of hexagons on a windows form.
To do this i have created a 'hexagon' class with the header file as follows:
ref class Hexagon
{
public:
Hexagon(int X, int Y, int I, int J);
Hexagon();
private:
array<Point>^ vertices;
Point Centre;
int i, j;
public:
int GetX();
int GetY();
void SetCentre(int X, int Y);
void CalculateVertices();
array<Point>^ GetVertices();
void drawHexagon();
};
i then want to have a 2 dimensional array storing these hexagons. my attempt at doing this is as follows:
array<Hexagon^,2>^ Grid
but i get the 'a variable with static storage duration cannot have a handle or tracking reference type'
how do i create a 2d array to add hexagons to?