title: What's the difference between sizeof and alignof?
body: <p>What's the difference between sizeof and alignof?</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  #define SIZEOF_ALIGNOF(T) std::cout&lt;&lt; sizeof(T) &lt;&lt; '/' &lt;&lt; alignof(T) &lt;&lt; std::endl
  
  int main(int, char**)
  {
          SIZEOF_ALIGNOF(unsigned char);
          SIZEOF_ALIGNOF(char);
          SIZEOF_ALIGNOF(unsigned short int);
          SIZEOF_ALIGNOF(short int);
          SIZEOF_ALIGNOF(unsigned int);
          SIZEOF_ALIGNOF(int);
          SIZEOF_ALIGNOF(float);
          SIZEOF_ALIGNOF(unsigned long int);
          SIZEOF_ALIGNOF(long int);
          SIZEOF_ALIGNOF(unsigned long long int);
          SIZEOF_ALIGNOF(long long int);
          SIZEOF_ALIGNOF(double);
  }
  </code></pre>
  
  <p>will output</p>
  
  <p>1/1
  1/1
  2/2
  2/2
  4/4
  4/4
  4/4
  4/4
  4/4
  8/8
  8/8
  8/8</p>
  
  <p>I think I don't get what the alignment is...?</p>