<htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>Binary Input and Output</title><metaname="generator"content="DocBook XSL Stylesheets V1.75.2"/><metaname="keywords"content=" ISO C++ , library "/><linkrel="home"href="../spine.html"title="The GNU C++ Library Documentation"/><linkrel="up"href="fstreams.html"title="Chapter27.File Based Streams"/><linkrel="prev"href="fstreams.html"title="Chapter27.File Based Streams"/><linkrel="next"href="io_and_c.html"title="Chapter28.Interacting with C"/></head><body><divclass="navheader"><tablewidth="100%"summary="Navigation header"><tr><thcolspan="3"align="center">Binary Input and Output</th></tr><tr><tdwidth="20%"align="left"><aaccesskey="p"href="fstreams.html">Prev</a></td><thwidth="60%"align="center">Chapter27.File Based Streams</th><tdwidth="20%"align="right"><aaccesskey="n"href="io_and_c.html">Next</a></td></tr></table><hr/></div><divclass="sect1"title="Binary Input and Output"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="manual.io.filestreams.binary"></a>Binary Input and Output</h2></div></div></div><p>
</p><divclass="itemizedlist"><ulclass="itemizedlist"type="disc"><liclass="listitem"><p><spanclass="quote">“<spanclass="quote">Derive your own fstream-type classes and write your own
post and continuing to the end of the thread. (The subject heading is "binary iostreams" on both comp.std.c++
and comp.lang.c++.moderated.) Take special note of the replies by James Kanze and Dietmar Kühl.
</p><p>Briefly, the problems of byte ordering and type sizes mean that
the unformatted functions like <codeclass="code">ostream::put()</code> and
<codeclass="code">istream::get()</code> cannot safely be used to communicate
between arbitrary programs, or across a network, or from one
invocation of a program to another invocation of the same program
on a different platform, etc.
</p></div><divclass="navfooter"><hr/><tablewidth="100%"summary="Navigation footer"><tr><tdwidth="40%"align="left"><aaccesskey="p"href="fstreams.html">Prev</a></td><tdwidth="20%"align="center"><aaccesskey="u"href="fstreams.html">Up</a></td><tdwidth="40%"align="right"><aaccesskey="n"href="io_and_c.html">Next</a></td></tr><tr><tdwidth="40%"align="left"valign="top">Chapter27.File Based Streams</td><tdwidth="20%"align="center"><aaccesskey="h"href="../spine.html">Home</a></td><tdwidth="40%"align="right"valign="top">Chapter28.Interacting with C</td></tr></table></div></body></html>