Hi I have a class MapMaker
class MapMaker {
private:
Node *grid[MAP_WIDTH][MAP_HEIGHT];
public:
MapMaker();
~MapMaker();
/*this does not work*/ Node*** getMap(int i);
};
I need a function that returns the "grid" attribute but I do not know how. Please help me. Below is the code that implements the logic for my function.
/*what to return here*/ MapMaker::getMap(int i) {
for (int i = 0; i < MAP_HEIGHT; i++) {
for (int j = 0; j < MAP_WIDTH; j++) {
grid[j][i] = new Node(j, i);
}
}
return grid;
}
Thanks!