title: Why can't c++ ifstreams read from devices?
body: <p>I knew I should never have started using c++ io, the whole "type safety" argument is a red herring (does anyone <em>really</em> find that it's one of their most pressing problems?). Anyhow, I did, and discovered a strange difference between ifstreams and FILE*s and plain old file descriptors: ifstreams cannot read from a device. Can anyone think of a reason why?</p>
  
  <pre><code>const char* path = "/dev/disk3";
  char        b;
  
  // this works
  FILE* f= fopen(path, "rb");
  int i = fread(&amp;b, 1, 1, f);     // returns 1, success!
  
  // this does not work
  ifstream    cf(path, ios::binary);
  cf.read(&amp;b, 1);
  bool        good = cf.good();   // returns false, failure.
  </code></pre>