Wouldn't it make more sense to pass cubeStep as a pointer as well? Passing by value may make you run out of memory. Also, can't layerPointer be a local variable within the for loop?
Wouldn't it make more sense to pass cubeStep as a pointer as well? Passing by value may make you run out of memory. Also, can't layerPointer be a local variable within the for loop?