X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Fdocs%2Fhtml%2F27_io%2Fbinary_iostreams_kanze.txt;fp=libstdc%2B%2B-v3%2Fdocs%2Fhtml%2F27_io%2Fbinary_iostreams_kanze.txt;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=65d79c996c5d3b0bb4f97c1da31195300df05e8e;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/libstdc++-v3/docs/html/27_io/binary_iostreams_kanze.txt b/libstdc++-v3/docs/html/27_io/binary_iostreams_kanze.txt deleted file mode 100644 index 65d79c99..00000000 --- a/libstdc++-v3/docs/html/27_io/binary_iostreams_kanze.txt +++ /dev/null @@ -1,51 +0,0 @@ - -From: James Kanze -Newsgroups: comp.lang.c++.moderated -Subject: Re: binary iostreams ? -Date: 3 Feb 2001 14:28:19 -0500 -Message-ID: <86lmro86qp.fsf@alex.gabi-soft.de> - -"Plinio Conti" writes: - -|> Why std c++ library stream classes are only text-oriented? - -Because that is the only universally recognized format. - -|> I mean, if I want to write an int, a float, etc. AS IT IS I can't -|> use streams, because they write and read a human readable text -|> format of numbers. - -Correct. - -|> Does anyone know how to solve the problem? - -It depends on what you really want to do. If you are just dumping a -block of memory to disk, in order to free up memory, and will reread it -later in the same run of the same program, ostream::write and -istream::read are what you need. Note, however, that this ony works 1) -in the same run of the same program, and 2) for PODs without pointers. - -If you are writing something that will be read by another program, or a -later run of the same program, you'll have to define a specific format -to use, and implement streams to input and output that. If you are -writing something that will be read by an existing program, or be -transmitted over a network to another machine, you will have to find out -what protocol is expected, and adher to it. - -|> Any public library? - -Not that I know of. I think that there is a library somewhere that -outputs in format RPC, or maybe some Internet format. - -|> What do you think about this choice? - -What other choice is possible? It's not reasonable to ask the standard -to support all binary formats, and it's not reasonable for it to favor -any one of them. Given that, what else can you do. - --- -James Kanze mailto:kanze@gabi-soft.de -Conseils en informatique orientée objet/ - Beratung in objektorientierter Datenverarbeitung -Ziegelhüttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627 -