[C++] How do i initialize the size of a 3D Array in c++ in a method

Ok so you declare a 3d array first and specifying the size in subscript operator so to stor a pointers you wold do it like this

MyDataType* mydata3dArray[sizeX][sizeY][sizeZ];

//and use it this way

mydata3dArray[indexX][imdexY][indeZ] = Data;

Note that the size must be known at compile time and must be a constant value