title: Passing arrays as a reference
body: <p>In C++ how can I pass <strong>an array as a reference</strong> when I don't know the size at compile time? So far, I found out that the only way to make it work is to use something like</p>
  
  <pre><code>const double( &amp;numbers ) [size]
  </code></pre>
  
  <p>but it means that I need to <strong>know the size of the array at compile time</strong>, thus I cannot use it in an external function.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>If I don't pass an array as a <code>( const double( &amp;numbers ) [length] )</code>, because for example I don't know its size, <strong>how do I make sure that it doesn't get copied</strong>, but it is <strong>referenced</strong>?</li>
  <li>If I pass an array like in the above example, <code>( double array[] )</code> is it <strong>referenced</strong> or is it <strong>copied</strong>?</li>
  </ol>