C -- passing a 2d array as a function argument?

Viewed 73699

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 []?

5 Answers
Related