title: Bit field vs Bitset
body: <p>I want to store bits in an array (like structure). So I can follow either of the following two approaches</p>
  
  <p>Approach number 1 (AN 1)</p>
  
  <pre><code>struct BIT
  {
     int data : 1
  };
  
  int main()
  {
     BIT a[100];
     return 0;
  }
  </code></pre>
  
  <p>Approach number 2 (AN 2)</p>
  
  <pre><code>int main()
  {
      std::bitset&lt;100&gt; BITS;
      return 0;
  }
  </code></pre>
  
  <p>Why would someone prefer AN 2 over AN 1?</p>