title: function prototype and array parameters
body: <p>I'm learning C++ syntax and I got to the point where I'm looking into arrays.
  I would like to ask you a question but first let me recap so I know that I got this stuff straight.
  I know that you can define a variable as an array with the following syntax:</p>
  
  <pre><code>&lt;base type&gt; name [&lt;size(constexpr)&gt;]
  </code></pre>
  
  <p>(the size being part of the type of the array).
  This would give me an array of <em>size</em> elements of <em>base type</em>
  If I wanted an array of pointers to the <em>base type</em> I could just add a * after the base type specifier as in normal pointer declaration.</p>
  
  <pre><code>&lt;base type&gt; *name [&lt;size(constexpr)&gt;]
  </code></pre>
  
  <p>I can't define an array of references because aray are supposed to hold only objects ( and references are just aliases).</p>
  
  <p>Now, if I wanted to declare a reference or a pointer to an array I could use this syntax:</p>
  
  <pre><code>&lt;base type&gt; (&amp;name) [&lt;size(constexpr)&gt;]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;base type&gt; (*name) [&lt;size(constexpr)&gt;]
  </code></pre>
  
  <p>So far it is all clear.
  What I also know, is that I can pass an array as an argument to a function, but that call will always be interpreted as I am passing a pointer to the array's elements type.
  A function that is declared as follows:</p>
  
  <pre><code>void f(int array[10])
  </code></pre>
  
  <p>is the same as:</p>
  
  <pre><code>void f(int array[])
  void f(int *p)
  </code></pre>
  
  <p>and whenever I call this function I am always passing a int* (passing by value).</p>
  
  <p>Question:
  what if I wanted to write the function prototype (a pure declaration) without using the parameter's name? I know that I can ordinarily omit parameter names in that case (I could write <code>void f(int*)</code> but what about the other two declarations?).And more importantly, what if the parameter is a reference or a pointer to an array?</p>
  
  <pre><code>void f(int (&amp;array)[])
  </code></pre>
  
  <p>or</p>
  
  <pre><code>void f(int (*array)[])
  </code></pre>
  
  <p>thanks!</p>