title: Difference between -> and . in a struct?
body: <p>If I have a struct like</p>
  
  <pre><code>struct account {
     int account_number;
  };
  </code></pre>
  
  <p>Then what's the difference between doing</p>
  
  <pre><code>myAccount.account_number;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>myAccount-&gt;account_number;
  </code></pre>
  
  <p>or isn't there a difference?</p>
  
  <p>If there's no difference, why wouldn't you just use the <code>.</code> notation rather than <code>-&gt;</code>? <code>-&gt;</code> seems so messy.</p>