I'm trying to have a manager class that contains an array of array of pointers to certain objects, let's call these objects mushrooms.
But I have no idea how the syntax for the decleration should go and how to access the pointers once in another function once I have it declated. Here are some ways that I thought the declarations should go..
Mushroom** mushroomArray;
Mushroom* mushroomArray[10][10];
Mushroom mushroomArray[10][10];
Are any of these valid? What are the differences?
And how would I go about accessing the pointers to the mushrooms in a function after the 2D array has been declared "correctly"?
Thanks
std::vector<std::vector<Mushroom*>>or if size is known astd::arrayofstd::arrays of pointers.