Say I want to create a function which finds the highest number in an array of arbitrary dimension, how would I construct the parameters to receive such a variable?

I don't want to create max functions for each of the following:

etc...Code:double max(double *num, int length) {...} double max2d(double **num, int length) {...} double max3d(double ***num, int length) {...}

That would be painful. I'd rather have a universal function that takes an array of any dimension, along with the number of the dimension itself.