Help! About text stream and binary stream

This is a discussion on Help! About text stream and binary stream within the C Programming forums, part of the General Programming Boards category; What are the differences between text stream and binary stream??? What are the benifits for using binary stream? The use ...

  1. #1
    C/C++Newbie Antigloss's Avatar
    Join Date
    May 2005
    Posts
    212

    Help! About text stream and binary stream

    What are the differences between text stream and binary stream???
    What are the benifits for using binary stream?
    The use of binary stream is better than text stream in what conditions?
    Last edited by Antigloss; 09-01-2005 at 08:00 AM.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,437
    > What are the differences between text stream and binary stream?
    text is usually printable, and delimited with '\n' characters. This makes it handy for reading using say fgets()

    > What are the benifits for using binary stream?
    You can use fseek() to locate specific records.

    > The use of binary stream is better than text stream in what conditions?
    Depends on what you're doing (see above answers)
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Buffering??
    By Brain Cell in forum C Programming
    Replies: 15
    Last Post: 09-21-2004, 06:57 AM
  2. displaying binary output
    By clancyPC in forum C Programming
    Replies: 1
    Last Post: 10-14-2003, 07:32 AM
  3. Replies: 11
    Last Post: 03-22-2003, 12:50 PM
  4. ascii v. binary
    By ygfperson in forum C++ Programming
    Replies: 2
    Last Post: 04-26-2002, 04:00 PM
  5. Replies: 4
    Last Post: 10-16-2001, 02:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21