Quote:
... and, BTW, using 'std::istream::read()' and 'std::ostream::write()'is almost certainly the *wrong* approach! These functions are an historical mistake which should have been corrected in the standard: It is my understanding that these methods were present in the IOStream version predating the rework from Jerry Schwartz and were left in to be compatible with the earlier stuff although they were not necessary: You could get binary I/O from the stream buffer level. The original IOStream library (maybe you remember using <stream.h>) did not have stream buffers and thus basic support for binary I/O was also present on the streams level.
So what I/O should I use for binary. It says you can take it from the stream buffer level.. how do I do that? or if I use one of the other ways, which one?: read()/write(), the reinterpret_cast<char*> one, the >> << operator, or the get()/put()?