Ah! the dreaded C++, ok look, you got several issues there. For starters let us see a basic multidimentional array
#define WIDTH 3
#define HEIGHT 3
int size [HEIGHT][WIDTH];
you can define it as a function parameter like this
void MyMagicFunction ( int array[2][3][4] ); void MyMagicFunction ( int array[2][3][4] )
{ }
Then call it like this
int aTest[2][3][4];
MyMagicFunction myFunc( aTest );
By no means this is the best and preferred way. It just makes the code that much complicated and ugly. May be you can use a
struct
to hold your multidimensional array or even better look for
vector
.