Thread: Stream vs. FILE*

  1. #1
    Registered User Aran's Avatar
    Join Date
    Aug 2001
    Posts
    1,301

    Stream vs. FILE*

    What do you guys thing?

    I, personally, love data streams. They are so customizeable and fun to work with. I never really had any interest in learning FILE* after i learned streams.

    And anyway, aren't FILE* commands just for backward compatability?

    If we've got iostream.h, why the hell don't we use it?

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Unfortunately if you want smaller faster code, with the majority of libraries streams aren't the way to go.

  3. #3
    Registered User Aran's Avatar
    Join Date
    Aug 2001
    Posts
    1,301
    i guess it depends on if you want flexibility, or a little more speed...

  4. #4
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Yeah, depends what you want to do. Although for the virtually any console mode program, I doubt whether a printf() will have any noticeable gains over cout<< so it's whatever your more comfortable with. I think both have their pros and cons.

  5. #5
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    For intensive formating, writing to screen or file with printf-style functions seems easier but more powerful.

    In the end, it's personal taste, though.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  6. #6
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    i've never used streams... (to my knowledge...) just printf and fopen and f*whatever functions... and that is a question i've always wondered myself. do you all recommend i bother learning about streams? i seem to do fine without them... thank you
    hasafraggin shizigishin oppashigger...

  7. #7
    Anti-Terrorist
    Join Date
    Aug 2001
    Location
    mming, Game DevelopmentCSR >&<>&2Minimization of boolean functions, PROM,PLA design >&0>&WA, USA guitar, dogsCommercial Aviation >&>>&USAProgramming
    Posts
    742
    Streams are part of the Standard C++ Library. I've heard that they are not used much, nor is much of the C++ STL because people use vedor libraries instead. But if you do not have the authority 'book' on STL and have not read The C++ Programming Language cover to cover or 'D&E' than how can you claim to know C++? Instead you will just know OOP methodology.
    I compile code with:
    Visual Studio.NET beta2

  8. #8
    Unregistered
    Guest
    , nor is much of the C++ STL because people use vedor libraries instead
    i don't know about that, guy. The only time i don't use the STL is when i'm using MFC. Then i use the MFC libraries. MFC accounts for about 15 percent of my programing...

  9. #9
    Anti-Terrorist
    Join Date
    Aug 2001
    Location
    mming, Game DevelopmentCSR >&<>&2Minimization of boolean functions, PROM,PLA design >&0>&WA, USA guitar, dogsCommercial Aviation >&>>&USAProgramming
    Posts
    742
    Okay, well that is alright but I've noticed a lot of people making pure language comparisons with the new .NET languages and wonder how much they really depend on the C++ definition. Microsoft has a lot of great C++ string handling and graphics libraries, etc. At some point, how are these abstractions different than migrating to a managed language? How honest will people be when they compare languages. I've never seen anyone site the strength of the CString object yet it is probably used a lot in real programs. I think that vendor libraries should not be overlooked, yet I also think that a C++ programmer should learn the entire definition.
    I compile code with:
    Visual Studio.NET beta2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. New stream flushing FAQ candidate?
    By Sebastiani in forum C Programming
    Replies: 9
    Last Post: 07-01-2009, 05:57 PM
  2. Stream Server
    By ch4 in forum Networking/Device Communication
    Replies: 18
    Last Post: 06-29-2009, 03:09 PM
  3. Discard wrong data from stream
    By mesmer in forum C Programming
    Replies: 7
    Last Post: 11-16-2008, 01:30 AM
  4. Closing a stream
    By cunnus88 in forum C++ Programming
    Replies: 8
    Last Post: 02-21-2008, 04:15 PM
  5. Help! About text stream and binary stream
    By Antigloss in forum C Programming
    Replies: 1
    Last Post: 09-01-2005, 08:40 AM