Re: Quick question about streams...?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Robby wrote:
Hello,

I am reviewing C++ and if I may say so I prefer C++ instead of C. So
I am gearing myself towards programming my future programs using
classes, objects, inheritance and so forth.

However, I see the need to do some saving of information on my hard
drive and the way to do this is (I believe) is using I/O streams.

I have a very interesting chapter in one of my C books thats shows
all of this! However, can I then apply what I would learn in C (IO
streams) to C++ or is C++ I/O streams far more different?

Quite different, although C++ IOStreams is typically implemented as a layer
atop the C stream functions, that's not a requirement and the programming
interfaces for the two are quite different.


My C++ book does not talk about streams. Also Petzold's book talks
about "Create file" in head.c program on p.411, I don't know if this
is the same as what my C book explains! (It doesn't seem like it!)

No, that's Win32 file I/O - the actual OS-level functions that C stream I/O
is built on (when running on Windows, that is).


I am a little confused about what to learn in order to do some file
saving operations!

Can someone guide me to what I should be learning.... C-I/O streams
or C++ I/O streams?

Ideally, all of the above.

I hope my question makes sence!

Yep, perfect sense.

All suggestions appreciated.

If you're serious about C++ <iostream> streams, the de-facto standard
reference is "C++ IOStreams and Locales" by Angelika Langer and Klaus Kreft.
"The C++ Standard Library" by Nicolai Josuttis has a lot of coverage of I/O
streams as well.

-cd


.



Relevant Pages

  • Re: COM Exception during SelectTerminalOnCall from C#
    ... Programming Interface functionality is not supported from managed ... Enumerate all streams of a call (to see if there are any streams ... ITTerminal localTerm = ... ITMediaPlayback mediaPlayback = localTerm as ITMediaPlayback; ...
    (microsoft.public.win32.programmer.tapi)
  • Re: String filtering
    ... The socket library I'm using right now doesn't do streams. ... > You should use the programming styles supported by Ada, ... > programming in Ada. ... David Trudgett ...
    (comp.lang.ada)
  • Re: Quick question about streams...?
    ... And isn't the API a bunch of C functions? ... I am gearing myself towards programming my future programs using ... drive and the way to do this is is using I/O streams. ... My C++ book does not talk about streams. ...
    (microsoft.public.vc.language)
  • Re: Learning Experience
    ... I will provide a link to those streams on Webster. ... stand the fact that his product has been a complete failure and his ... by the assembly programming community. ...
    (alt.lang.asm)
  • Re: counting and loops
    ... Have you considered using Data->Subtotals command? ... Nigel ... > i need help with programming a module that will count a column by ... > before a different value occured in addition with saving the row number ...
    (microsoft.public.excel.programming)