title: istream::read not filling char array correctly
body: <p>I'm opening an istream for binary read:</p>
  
  <pre><code>ifstream file;
  file.open (this -&gt; fileName.c_str(), ios::binary);
  </code></pre>
  
  <p>I then try to read, while the file is good, into a char array pointer:</p>
  
  <pre><code>char data[numberOfBytes];
  char * p = data;
  file.read(p, numberOfBytes);
  cout &lt;&lt; "size: "   &lt;&lt; sizeof(p)     &lt;&lt; end
  cout &lt;&lt; "gcount: " &lt;&lt; file.gcount() &lt;&lt; endl;
  cout &lt;&lt; "strlen: " &lt;&lt; strlen(p)     &lt;&lt; endl;
  </code></pre>
  
  <p>The output is different for each of the above. Sizeof() produces 4 which is correct size of char pointer. gcount() produces whatever value numberOfBytes has. However, strlen() returns some other smaller number. So, although read() has moved the istream pointer numberOfBytes, I do not have these bytes in the char array. I want all those bytes in the char array. How do I achieve this? What is going on?</p>