title: Difference between an int passed by reference and a passed address of an int
body: <pre><code>void VoidRef (int &amp;ref){
     ref++;
  }
  
  void VoidPtr (int *ptr){
    (*ptr)++;
  }
  
  int test= 5;
  
  VoidRef(test);
  cout &lt;&lt; test;  // is 6
  
  VoidPtr(&amp;test);
  cout &lt;&lt; test;  // is 7 !
  </code></pre>
  
  <p>Why do both voids do the same thing?
  Which void needs more resources?</p>