title: C++ struct size: 2+4+2+2+4 = 16
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/119123/why-isnt-sizeof-for-a-struct-equal-to-the-sum-of-sizeof-of-each-member">Why isn&rsquo;t sizeof for a struct equal to the sum of sizeof of each member?</a>  </p>
  </blockquote>
  
  <p>Why is the <code>sizeof();</code> of this structure 16 bytes?  I'm compiling in g++.</p>
  
  <pre><code>struct bitmapfileheader {       
       unsigned short bfType;
       unsigned int bfSize;
       unsigned short bfReserved1;
       unsigned short bfReserved2;
       unsigned int bfOffBits;   
     };
  </code></pre>