title: using fread to read into int buffer
body: <p>I would like to know if I can use fread to read data into an integer buffer. 
  I see fread() takes void * as the first parameter. So can't I just pass an integer
  buffer (typecast to void *) and then use this to read howmuchevery bytes I want to from the file, as long as the buffer is big enough ? </p>
  
  <p>ie. cant i do:</p>
  
  <pre><code>  int buffer[10];
    fread((void *)buffer, sizeof(int), 10, somefile);
    // print contents of buffer
    for(int i = 0; i &lt; 10; i++)
    cout &lt;&lt; buffer[i] &lt;&lt; endl;
  </code></pre>
  
  <p>What is wrong here ?</p>
  
  <p>Thanks</p>