This book, which presents 100 tips, can be regarded as a set of recipes or a cookbook. As such, we can expect it to meet the following criteria: it should have good examples that are accurate, and use current coding conventions; the examples should cover a broad range of applications within the domain, so as to make the book useful; the examples should be general enough to be easily expanded or adapted by a reader, to solve his or her own problems; and, ideally, the problems should give some insights into the language, and teach good idioms. I feel that this book has succeeded to some degree in meeting these criteria.
Each tip consists of a short title (for example, Tip 5 is “Construct a container filled with a specified value”). This is then followed by an “Applies to” statement that gives a short description of where (or how) the tip can be applied, followed by cross references to other tips. A quick solution is th!en presented that gives a summary of the tip. This is followed by a detailed solution that contains both a written discussion and a reasonably complete bit of sample code.
The tips address the standard template library (STL), and the book covers the topic well. One problem that I found with the tips is that most of them do little more than give detailed examples of the low-level abilities of the STL. For example, there is a tip on initializing a container from a C array, another one on initializing a container with multiple values, and a third on initializing a container from another container. These do not add significantly to what can be learned from the documentation that usually accompanies the STL, or from much briefer STL tutorials. Having said that, there are often useful reminders, such as in the tip for removing duplicates, which notes that the list must be sorted to remove all duplicates.
The rest of the book consists of some introductory chapters, whic!h give a cursory overview of the C++ standard library, and a slightly longer useful review of the STL. At the end of the book is a chapter on image processing, which shows the tips in the context of a realistic program. The book also includes a CD, which contains all of the source code from the book, as well as a copy of the BOOST library.
I don’t think that people who have been using the STL, and who feel comfortable with it, will get much benefit from this book. I think the main groups who will benefit from reading it will be those who have just started with the STL, or those who have been frustrated by the lack of good examples for learning how to use the library correctly.