Unfortunately with 2D arrays in C++, to properly access them you always need to know the "width" dimension. It is possible to pass them as pointers, but you still need to pass the width dimension as a parameter to get at the data. This is why C++ makes you include the dimension in the function parameter. If you don't know how 2D arrays work, I'll explain why this is the case. If you know already or don't care, then stop reading now.
As you probably already know, on their most basic level an array in C++ is just a pointer to the start of a string of sequential memory locations (these locations are the elements in the array). This is why for 1D arrays, you can pass them around as if they were pointers with no problems. When you access an element in the array, you're actually doing something like this: go to the memory location where the array starts, move up in memory an amount equal to the number of the element requested (times the number of bytes in the data-type), and grab the data at that memory location.
So, as for 2D arrays...when you make a static array in C++, you're really just making a 1D array whose length is equal to the length * width of the specified 2D array. So something like "int twoDeeArray[HEIGHT][WIDTH]" is just converted to "int twoDeeArray[HEIGHT * WIDTH]". To access them, the two elements also have to be converted. The formula for this is as follows: "twoDeeArray[y][x] -> twoDeeArray[(y * WIDTH) + x]".
So knowing this, you might notice that it should be possible to pass a 2D static array as a parameter to a function by simply passing it as a pointer and then accessing the elements as you would in a 1D array. However this brings us back to the original problem, which is that you can't actually access the element without knowing value of WIDTH. This means we still have to pass WIDTH as a parameter to function. The upside however, is that it can allow your function to be more flexible (IE, it can work for 2D arrays of different sizes). Here's a little code sample that demonstrates what I was talking about:
#include <iostream>using namespace std;void print2DArray (int* p, int width, int height){ for (int y = 0; y < height; y++) for (int x = 0; x < width; x++) cout << p[(y * width) + x] << endl;}int main (){ int twoDeeArray [3][2]; twoDeeArray [0][0] = 0; twoDeeArray [0][1] = 1; twoDeeArray [1][0] = 2; twoDeeArray [1][1] = 3; twoDeeArray [2][0] = 4; twoDeeArray [2][1] = 5; print2DArray ((int*)twoDeeArray, 2, 3); return(0);}