Thread: Binary I/O with cin and cout

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    7
    It depends on what you mean by "binary".
    I meant "raw" or "unaltered" data.

    Thanks for your strtol() example anyway, it was wonderfully helpful.

    No, it's talking about not making character set conversions of multiple bytes. When a stream is binary oriented, you'll get CR and LF separately instead of the two merged into '\n', for example.
    So interpreting "\r\n", '\n' - both of them as '\n', is that what it was talking about? Is there any other differences between binary I/O and text I/O except that?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Is there any other differences between binary I/O and text I/O except that?
    No, that's pretty much it unless you want to talk about internationalization and multibyte characters.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Overriding Cin with Cout
    By Tainted in forum C++ Programming
    Replies: 5
    Last Post: 10-06-2005, 02:57 PM
  2. I'm REALLY confused. Why isn't cout or cin working here?
    By niudago in forum C++ Programming
    Replies: 8
    Last Post: 02-15-2003, 05:53 PM
  3. cin and cout
    By quentin in forum C++ Programming
    Replies: 6
    Last Post: 04-27-2002, 02:04 PM
  4. STL to: Cin, Cout, ifstream & ofstream
    By kuphryn in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2001, 09:32 AM
  5. i don't know about cin, cout, flag.
    By comwin in forum C++ Programming
    Replies: 2
    Last Post: 11-08-2001, 04:26 AM