Recommend a STL book?

Started by
14 comments, last by d000hg 18 years, 3 months ago
Lots of C++ programmers have a pretty poor STL knowledge - we know the container classes but beyond that it's all a bit scary. I got the chance to look at "The C++ Standard Library: A tutorial & reference" by Nicholai M. Josuttis and it seems OK - but would you guys recommend any particular book as 'the best'? I am NOT after a C++ book, but one dealing specifically with the STL. Examples are essential since much of the stuff isn't that intuitive; it must also be a thorough reference. Many thanks in advance for your advice.
Advertisement
IMO the best resources to me have been the microsoft MSDN and this forum right here. I can't really suggest a book though...

----------------------------------------------------------Rating me down will only make me stronger.----------------------------------------------------------
josuttis
I have the Josuttis book and think it's quite good.
Meyers' Effective STL is good for examples, but far from a full reference. As far as I can tell, most people get Josuttis as a reference and Meyers as a guide.
[size="1"]
Josuttis wrote a very thorough book. Working through the examples in the book I ran into a number of errors in the implementation of the STL I was using at the time. If you don't make much use of the STL or less than you think you should due to lack of familarity with it then it's a very good book to work through. It won't make you an expert, you have to actually use the STL a good deal to achieve that, but you will gain a solid understanding of the features and capabilities of the STL.

Once through that book then his book on templates will help you understand the STL even better. He uses a lot of example from the STL in that book. One basically addresses what the STL does while the other addresses why it does what it does as it does. Certainly between the two you would have a solid foundation upon which to build an expertise on the STL.

Both books combined might be a bit of an overkill for an independant programmer simply trying to be a bit more productive and reduce the potential for errors. It might well be a bit of an overkill for a team of five or so programmers as well. With several such teams it would certainly be a good idea to have one person with a solid understanding of both the features/capabilities of the STL and it's implementation. Particularly if across teams there is a strong tendancy to under-utilize the STL.
Keys to success: Ability, ambition and opportunity.
Quote:Original post by LilBudyWizer
Both books combined might be a bit of an overkill for an independant programmer simply trying to be a bit more productive and reduce the potential for errors. It might well be a bit of an overkill for a team of five or so programmers as well. With several such teams it would certainly be a good idea to have one person with a solid understanding of both the features/capabilities of the STL and it's implementation. Particularly if across teams there is a strong tendancy to under-utilize the STL.

That pretty much describes the situation. I'm trying to persuade my project manager to fund some books on STL since we use it very little - this week was the first time in 2 years on the project I saw some non-container STL in our 1Million line codebase. The guy that wrote that isn't on the team so it took me a while to figure it out - the 3 line functor which replaced about 15 lines of code.

While [imo] Josuttis' book could be a little better in some of the orginizational aspects, it is [imo/to my knowledge] the best on the subject.

I didn't care for Meyers at all.
Why was that? I looked at the contents pages on Amazon and it sounded quite good.
Effective STL is a good book for using the STL, but it's not a STL reference or a comprehensive source.

edit: s/C++/STL

This topic is closed to new replies.

Advertisement