title: Passing array of vectors as a function parameter to change the original values
body: <p>I have an array of vectors (of ints) and I want to pass it to a member function as reference so it can be modified. (It actually is the output of my function but I already have a return value.)</p>
  
  <p>I wrote something like this</p>
  
  <pre><code>int Dag::dag2array(vector&lt;int&gt; (&amp;aVectors)[4])
  { 
  //some stuff
  //calling another function tree2array(aVectors) 
  //passing the same array as reference
  }
  </code></pre>
  
  <p>It compile and runs although it looks like it is not doing what I want.</p>
  
  <p>In a more or less opposite question (<a href="https://stackoverflow.com/questions/24039087/passing-array-of-vectors-as-a-function-parameter-values-will-not-change">Passing array of vectors as a function parameter (values will not change)</a>), the answers say that the array can be modified without <code>&amp;</code> and that it does not make a copy but it is like a pointer.</p>
  
  <ol>
  <li>Why for a variable like an <code>int</code> one needs the <code>&amp;</code> to avoid
  copying and to be able to modify the value of the original variable "on the fly" and not for an array?</li>
  <li>Should I use the <code>&amp;</code> or not in my case?</li>
  </ol>