-1

I would like to learn about streams in C++. I have done some googling and searching on Amazon and have not had any success in finding a book/web resource on this topic. Any suggestions would be much appreciated! I have found some information on sites like cplusplus and forums, but I'm still still unclear about a number of issues. I would really like a clear, comprehensive resource.

One thing that I would like to do is get input for my programs from external files.

Thank you for any suggestions.

Ant
  • 753
  • 1
  • 9
  • 24
  • 1
    You probably haven't found a book because the topic of "streams" isn't big enough for a book. Learning to read an external file with an `ifstream` should require a few pages of documentation at most. – user229044 Feb 02 '11 at 14:28
  • Hi meagar. That's what I thought at first, but the texts I have don't go into enough detail. I would like to find out how data() and c_str() work and how they differ, for example. I can't find any online resources that make sense to me. – Ant Feb 02 '11 at 14:39
  • @meagar: [Really not enough for a book?](http://books.google.com/books?isbn=0201183951) – Fred Nurk Feb 02 '11 at 15:13
  • 1
    @Fred I would guess that only a few pages are about streams, and the rest is about locals :p – user229044 Feb 02 '11 at 15:16
  • Thanks Fred. My library has it and it's really helpful. – Ant Feb 02 '11 at 17:14

2 Answers2

2

Standard C++ IOStreams and locales by Langer and Kreft is dedicated to streams (and locales, which streams use extensively), but it sounds like you want a general overview as you'd find in a general reference or introductory book.

Community
  • 1
  • 1
Fred Nurk
  • 13,952
  • 4
  • 37
  • 63
1

I don't know of a book that deals with streams as its major subject. I'm sure you can find a lot of resources on the Internet, but judging their quality may be difficult. The following two books have rather good coverage of streams and might be work looking into. Of course they cover a lot more than just streams.

Dr. Watson
  • 3,752
  • 4
  • 32
  • 43