title: C++ - Getting size in bits of integer
body: <p>I need to know whether an integer is 32 bits long or not (I want to know if it's exactly 32 bits long (8 hexadecimal characters). How could I achieve this in C++? Should I do this with the hexadecimal representation or with the unsigned int one? </p>
  
  <p>My code is as follows:</p>
  
  <pre><code>mistream.open("myfile.txt");
  
  if(mistream)
  {
      for(int i=0; i&lt;longArray; i++)
      {
          mistream &gt;&gt; hex &gt;&gt; datos[i];        
      }
  }
  
  mistream.close();
  </code></pre>
  
  <p>Where mistream is of type ifstream, and datos is an unsigned int array</p>
  
  <p>Thank you</p>