title: read() function in c++ similar to c read()
body: <p>Is there any method equivalent to c <code>read()</code> in c++? To illustrate my question, in C, if I have:  </p>
  
  <pre><code>struct A{  
    char data[4];  
    int num;  
  };
  </code></pre>
  
  <p>...and if I use:</p>
  
  <pre><code>A* a = malloc (sizeof(struct A));  
  read (fd, a, sizeof(struct A));
  </code></pre>
  
  <p>I can directly populate my struct. Is there a way in c++ to achieve this without using c read() method? Methods in <code>std::istream</code> need <code>char*</code> as an argument, is there any method which takes <code>void*</code> as an argument?</p>