Home
Fractals
Tutorials
Books
My blog
My LinkedIn Profile

BOOKS i'm reading

Napoleon Hill Keys to Success: The 17 Principles of Personal Achievement, Napoleon Hill, ISBN: 978-0452272811
The 4-Hour Workweek: Escape 9-5, Live Anywhere, and Join the New Rich (Expanded and Updated), Timothy Ferriss, ISBN: 978-0307465351
The Fountainhead, Ayn Rand, ISBN: 0452273331
Web Hosting Canada

mailto:olivier@olivierlanglois.net

C++ IOStreams Handbook

09/02/08

Permalink 09:54:54 pm, by lano1106, 415 words, 2381 views   English (CA)
Categories: C++

C++ IOStreams Handbook

C++ IOStreams Handbook, Steve Teale, ISBN:020159641

This book has been published in 1993 and iostreams has changed a lot since then so this book is a bit outdated. Things that were not there in 1993 include:

  • extension less header files
  • std namespace
  • IO stream classes were not templates
  • No locale and facet classes
  • classes that are now deprecated strstream

Surprisingly even with all these changes, most of the code in the book would still compile today. This is one sign that C++ designers took a great care to not break existing code unless absolutely necessary. The book is divided into different chapters. Materials that have still value today are:

  • The first 3 chapters that explain why a programmer should prefer using io streams over printf
  • The next few chapters describing the translator classes (istream,ostream,etc)
  • Even if the code is rather cryptic in my opinion, there is a chapter that shows how to write table based extractor and inserter functions (operator<< and operator>>). One application of such function, for instance would be to implement a regular expression processor with a DFA.

There are easier ways to implement regular expressions with the boost library. The value that I see in the third point is that I have always kept my own operators << and >> very simple and I have found this part of the book was eye opening to what was possible to do with these functions.

The chapter that I have found to have failed the test of time is the last and very lengthy chapter that presents close to 50 small test programs so you could test that your iostream implementation was compliant with the latest C++ draft specifications for iostreams. At the publishing time, it was perhaps needed as C++ implementations were trying to catch up with a moving standard but today, iostreams specifications have been stable for many years. I think that it is safe to take for granted that your iostreams behavior is compliant with the standard or it should be a total shame for the library developer if it is not the case.

To conclude, since the book is still accurate on most points, it can still be handy as a reference if it is hanging around. However, at the same time, since iostreams have changed in subtle ways since the publishing date, I would recommend looking for a more recent book for a new purchase. I have not read it but 'Standard C++ IOStreams and Locales' might be a better choice.

Comments, Pingbacks:

No Comments/Pingbacks for this post yet...

This post has 7 feedbacks awaiting moderation...

Comments are closed for this post.

Olivier Langlois's blog

I want you to find in this blog informations about C++ programming that I had a hard time to find in the first place on the web.

August 2017
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Search

Custom Search

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 25

powered by
b2evolution