I have a template class in C++ that looks like this:
template <typename T, int xMax, int yMax, int zMax>
class Volume {
public:
T*[64][64] getDataPointer() {return data;} //compiler doesn't like this line
private:
T data[xMax][yMax][zMax];
};
typedef Volume<unsigned char, 64, 64, 64> Chunk;
The compiler doesn’t like the return I have for getDataPointer(). I want to return the same type I would then use to pass to this function:
void perlin2D(unsigned char (*chunk)[64][64])
Can someone show me how to do that?
Change the signature to :