title: C++ is there a difference between dereferencing and using dot operator, vs using the arrow operator
body: <p>Let's say I have the following variable:</p>
  <pre><code>MyObject* obj = ...;
  </code></pre>
  <p>If this object has the field <code>foo</code>, there are two ways of accessing it:</p>
  <ol>
  <li><code>obj-&gt;foo</code></li>
  <li><code>(*obj).foo</code></li>
  </ol>
  <p>Are there any differences between using one method over the other. Or is the first method just syntactic sugar for the second?</p>
  <p>I was thinking maybe the first one could cause the copy constructor of the object to be called since it is now holding onto the value.</p>