One can easily define a function that accepts a 1d array argument like this:
int MyFunction( const float arr[] )
{
// do something here, then return...
return 1
}
Although a definition such as:
int MyFunction( const float* arr ) would work as well.
How can one define a function that accepts a 2d array argument?
I know that this works:
int MyFunction( const float** arr ) — but, is it possible to use the first variation that uses []?
In C99, you can provide the dimensions of the array before passing it: