Declaring a function of multidimensional array parameters.

int first[3][9] = {
{1, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0, 0, 0},
};
void show (int image[][]) {
}

Is wont let me compile this so i did this instead..

void show (int image[3][9]) {

}

Is there another way this should be done or am i doing it right?

You can use
void show (int image[][9]) but that probably wont help enough.

The reason for the limitation is that the copmiler needs to know what to multiply the first index by, to at the right row. If you do

Serial.print(image[2][4])

the compiler will generate

(2*9+4)*sizeof(int)+(&image)

where "&image is the start point of the array, to get the right point.

You could just pass a pointer to the first arraysubscript, but then you have to do those calculations yourself and some typecasting.

Is it a problem? I mean will you pass differnet sized arrays to this function or are they all the same?. In which case just use #define or const int constants that define the size. If you only have one array, then just leave it global, and not mention it in the argument list.

no all arrays will be of a constant size. All i wanted to know is whether i had to declare the size for second dimension or not. thx

All i wanted to know is whether i had to declare the size for second dimension or not.

In general, you need to define all the dimensions, except the last one. For a 1D array, no dimensions are required. For a 2D array, one is required. For a 3D array, 2 are required. For an N dimension array, N-1 are required.