title: Reading in raw files C++
body: <p>How is data stored when read in using <code>fstream class</code>? An example will clarify my question:</p>
  
  <pre><code>    char * memBlock = NULL;
      fileSize = file.tellg();
      memBlock = **new** char[fileSize];
      file.seekg(0, ios::beg);
      file.read(memBlock, fileSize);
      file.close();
  
      if(memBlock)
      return memBlock;
  </code></pre>
  
  <p>The context is that I am reading a raw image that has been recorded in hex so that </p>
  
  <ul>
  <li>the values representing the pixels are either 00 or ff (black or white, 1 or 0) </li>
  <li>and are arranged in columns and rows. </li>
  </ul>
  
  <p>When reading the file in memory, are the values in the <code>memblock array</code> stored as ff and 00 or are they converted into 1 and 0 automatically by ASCII or something?</p>