Passing multidimensional array to a function (c++)?
===

I've been trying to pass a multidimensional array, of an unknown size, to a function, and so far have had no luck, when the array is declared, its dimensions are variables:

    double a[b][b];

As far as I can tell, I need to give the value of b when I declare the function, a can be unknown. I tried declaring b as a global variable, but it then says that it must be a constant.

ie:

    int b;
    
    double myfunction(array[][b])
    {
    }
    
    int main()
    {
    int a;
    double c;
    double myarray[a][b];
    
    c=myfunction(myarray);
    
    return 0;
    }

Is there any way get this to work?

Thanks,
Angus
