]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libstdc++-v3/contrib/libstdc++-v3-4.4/doc/html/manual/bk01pt11ch27s03.html
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib / libstdc++-v3-4.4 / doc / html / manual / bk01pt11ch27s03.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>More Binary Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10;      ISO C++&#10;    , &#10;      library&#10;    " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="fstreams.html" title="Chapter 27. File Based Streams" /><link rel="prev" href="bk01pt11ch27s02.html" title="Binary Input and Output" /><link rel="next" href="io_and_c.html" title="Chapter 28. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">More Binary Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27s02.html">Prev</a> </td><th width="60%" align="center">Chapter 27. File Based Streams</th><td width="20%" align="right"> <a accesskey="n" href="io_and_c.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.filestreams.binary2"></a>More Binary Input and Output</h2></div></div></div><p>Towards the beginning of February 2001, the subject of
4       "binary" I/O was brought up in a couple of places at the
5       same time.  One notable place was Usenet, where James Kanze and
6       Dietmar Kühl separately posted articles on why attempting
7       generic binary I/O was not a good idea.  (Here are copies of
8       <a class="ulink" href="binary_iostreams_kanze.txt" target="_top">Kanze's article</a> and
9       <a class="ulink" href="binary_iostreams_kuehl.txt" target="_top">Kühl's article</a>.)
10    </p><p>Briefly, the problems of byte ordering and type sizes mean that
11       the unformatted functions like <code class="code">ostream::put()</code> and
12       <code class="code">istream::get()</code> cannot safely be used to communicate
13       between arbitrary programs, or across a network, or from one
14       invocation of a program to another invocation of the same program
15       on a different platform, etc.
16    </p><p>The entire Usenet thread is instructive, and took place under the
17       subject heading "binary iostreams" on both comp.std.c++
18       and comp.lang.c++.moderated in parallel.  Also in that thread,
19       Dietmar Kühl mentioned that he had written a pair of stream
20       classes that would read and write XDR, which is a good step towards
21       a portable binary format.
22    </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch27s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="fstreams.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="io_and_c.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Binary Input and Output </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 28. Interacting with C</td></tr></table></div></body></html>