Hi all. I'm a new member

I posted the following in the stickied book thread as it seemed the most appropriate place for it. That was 2 days ago and no one responded so I probably guessed wrong. If I shouldn't have reposted, then I'm sorry. Here is the post with some minor changes

I'm currently taking my second C++ class in college and having some difficulty with a couple of programs. The point of this thread isn't to get help with them, though I may post about that later. I'm looking for a one stop shop basically, which will cover in detail everything I need to know.

I need a good reference regarding file i/o objects and syntax so that I don't have to keep switching between my 2 C++ books and several websites, trying to figure out whether I should use ifstream and ofstream, or fstream instead. (and getting all confused)

Ok. Here's the specs for one of the programs, so you get an idea of what I'm looking for.
The program must write some text to a file.
The program must retrieve the text, display it, and then count the vowels in it.

I've created some smaller versions of the program, based on programs in books, and gotten them to work, basically snippets. I haven't managed to get the whole thing working. None of my resources cover the whole picture. It's annoying. One program demonstrates writing to a file, one reading, another does something else, etc. It seems like it shouldn't be a big deal to combine the concepts into one program, but I haven't managed it yet.

The following book was recommended in the Books thread.

The C++ Standard Library: A Tutorial and Reference (Hardcover)
by Nicolai M. Josuttis (Author)

Would this be a comprehensive reference, listing and describing all the standard parts of file i/o, objects etc, plus tons of other standard objects? If so, have there been any significant changes that would make parts of it outdated? (It's a few years old)

Thanks folks!

-Ubercat

>>I posted the following in the stickied book thread as it seemed the most appropriate place for it. That was 2 days ago and no one responded so I probably guessed wrong

Yes you were wrong to post it there so I deleted it just now because of this thread. You get a lot faster response by creating your own thread as you did here. I don't think those Read Me threads get read very often.

> Would this be a comprehensive reference, listing and describing all the standard parts of file i/o, objects etc
this book explains the stl part of the standard library very well. very good for learning that part of the c++ library and would be a handy reference later.

however, if your primary interest is in learning about the iostream library, this is perhaps not the ideal book.
Standard C++ IOStreams and Locales: Advanced Programmer's Guide and Referenceby Angelica Langer and Klaus Kreft (Addison-Wesley Professional) would be what you are looking for.

each of these books cover different parts of the standard library.

> have there been any significant changes that would make parts of it outdated?
no, there is nothing that could be called a *significant* change. however, there are additions proposed in the upcomming c++0x standard; the ones already accepted (TR1) are covered in
The C++ Standard Library Extensions: A Tutorial and Reference By Pete Becker (Addison Wesley Professional)
TR1 almost doubles the size of C++ standard library; so there are a lot of things here as well.

Thank you for the tip vijayan.

I checked out the book on Amazon and it looks a little over my head. Plus it would be a big purchase if it only covers iostreams. I need a reference that will help me now with streams and file I/O, and help me later with linked lists and other advanced C++ topics.

Maybe the book I'm looking for doesn't exist. I just hate having to keep switching between books and websites, dealing with different authors differing styles, and trying to synthesize new programs from scraped together tidbits.

I thought that the standard template library was the library of all standard functions for all common C++ areas. If that's not the case, I wonder what the stl actually is, and what it's useful for. I'll have to look around here and see if anyone has given a description of it for relative newbies like me. I've never come across an explanation in the past. It just seems assumed that everyone already knows about it.

-Ubercat

> I wonder what the stl actually is, and what it's useful for.
see http://en.wikipedia.org/wiki/Standard_Template_Library

> I thought that the standard template library was the library of all standard functions for all common C++ areas
stl is a subset of the C++ standard library, and provides containers, algorithms, iterators, function objects, generic strings etc. the other important pars of the standard c++ library are streams and i/o, numerics, language support and the iso C standard library. currently, the stl portion constitutes roughly one third of the c++ standard library.

> I need a good reference regarding file i/o objects and syntax so that I don't have to keep switching ...a reference that will help me now with streams and file I/O, and help me later with linked lists and other advanced C++ topics.
The C++ Standard Library: A Tutorial and Reference by Nicolai M. Josuttis does have introductory tratment of stream classes, stream manipulators and formatting, file I/O, internationalization, and locales. and would be more than adequate for all your immediate requirements.

Thanks again, vijayan121. It sounds like the book would be very helpful. I will probably be getting it soon.

-Ubercat

Hi, I'm taking a file structures class and we are using File Structures By: Michael J. Folk
An Object-Oriented Approach With C++

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.