I was wondering if it is possible to pass part of a multidimensional array in c++. For example say I have an array of three dimensions (size X * Y * Z):
int array[X][Y][Z];
And say I also have a function that takes a two dimensional arrays (size Y * Z) as one of it's parameters:
void function(int stuff[Y][Z]);
Is it possible to call the function like this?
function(array[x_var]);
As in like pass the x_var slice of the three dimensional array only and therefore passing a two dimensional array[y][z] in effect..
Or would I have to use a new two dimensional array, copy the slice into that, then pass that into the function?