Help understanding multidimensional array and pointer notation in c++
<p>I understand the basic idea that when an array is the sole operand of the &amp; or sizeof() operator, it decays to a pointer to the first element in the array.  I'm unsure how these notations work though.  In our text, there is the 1-D case, vs the 3-D case for an array.  The first example is the function declaration for a function called average.  The 1-D case is</p>

<pre><code>double average(double set[]) or
double average(double *set)
</code></pre>

<p>Those make sense to me.  The equivalent multi-D case does not.  Their declaration is</p>

<pre><code>double average (double set[][DIM1][DIM2]) or
double average (double (*set)[DIM1][DIM2])
</code></pre>

<p>Similarly, the function declaration for printing a value for 1-D is:</p>

<pre><code>double *printvalue(double value)
</code></pre>

<p>The multi-D case is:</p>

<p>double (*printvalue(double value))[DIM1][DIM2]</p>

<p>Can anyone shed any light on this?  Thanks.</p>
