title: difference between a pointer and reference parameter?
body: <p>Are these the same:</p>
  
  <pre><code>int foo(bar* p) {
    return p-&gt;someInt();
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>int foo(bar&amp; r) {
    return r.someInt();
  }
  </code></pre>
  
  <p>Ignore the null pointer potential. Are these two functions functionally identical no matter if <code>someInt()</code> is virtual or if they are passed a <code>bar</code> or a subclass of <code>bar</code>?</p>
  
  <p>Does this slice anything:</p>
  
  <pre><code>bar&amp; ref = *ptr_to_bar;
  </code></pre>