Mastering the Standard C++ Classes, by Cameron Hughes and Tracey Hughes, purports to be "An Essential Reference" to the classes carefully specified in the C++ standard often lumped together under the name of the Standard Template Library (STL). In reality, despite good intentions and hard work on the part of the authors, the book is tedious and apt to exasperate the reader.
The problem with Mastering the Standard C++ Classes is twofold. To start with, the authors are experts; that is to say, they have specifically cultivated expertise in the problem domain of the book and exhibit fuzziness and gee-whizzism about the object metaphor in general. Here's a sample from Chapter 3, "The Iostreams:"
"The iostreams are a set of C++ classes used to implement an object-oriented model of input and output. The iostream facilities are packaged as a standard component with all C++ compilers is [sic] an object-oriented input/output facility providing access to unbuffered (low-level) and buffered I/O operations. If for some reason these iostream facilities are not sufficient for the job at hand, the programmer can improve them through inheritance, polymorphism, encapsulation, and specialization."
The above buzzword-rich eyelid ballast, with its two disagreeing indicative verbs in one clause, will also have introduced you to the second problem, which is that the writing puts even the editors to sleep. From Chapter 7, "The Standard C++ Containers:"
"The runtime version of the stack class is an object. This means that stacks can be used in the same way as any other object in the C++ environment. We can use inheritance, polymorphism, and encapsulation [ad infinitum, apparently]... The runtime version of the stack class can be passed as parameters [editor asleep again] and compared with relational operators..."
The drowsy reader may occasionally wake with a start and realize that what just went by on the page doesn't have a discernible meaning. Again from Chapter 7:"Stacks have a wide variety of applications. They are used in everything from graphical user interface processing to mathematical expression and computer language parsing. They can also be used to process aging relationships." Nothing very much like information is being conveyed here. The late P.G. Wodehouse's character Gussie Fink-Nottle used to babble in factoids this way, although about newts, not computer science.
In the introduction, the authors thank their editors "who endured our many, many restarts and missed deadlines." Apparently, the editors decided that the reader is obligated to share some of the burden of endurance. Most noticeable in this regard is the sloppy CD-ROM content.
First of all, there doesn't seem to be any rule whereby the content was chosen. The essential model is that the examples are the listings from the book. However, some listings are missing. Because "Using the Software" says that "each example can be compiled as a standalone program," I thought that the rule was that examples without a main() were discarded, but many lacking main() are indeed on the disk. Some just aren't.
Also, the examples as they appear on the CD-ROM are often uncompilable until edited due to flawed or outdated #include syntax or due to missing #include directives. The fixes are trivial but conceivably puzzling to the STL novice. Oddly enough, some of the problematic listings found on the CD-ROM are correct (or closer to correct) in the book's text.
Apparently no testing occurred late in the publishing cycle, despite the authors' claim to support "GNU C++ 2.7.2 and above." The bogus #includes are recognizably gcc 2.7.2, but not "above." They also support Sun CC 3.0, among others, though my experience with Sun CC through 4.2 suggests that the RogueWave STL add-in would be required. The book has a formal publication date of July 30, 1999. Sun CC has gone through at least five versions that I know of since 3.0 (my copy of 3.0.1 was installed in November, 1997) and is now at 5.0. I tested several examples and they do not compile as delivered under Sun CC 5.0 nor under Linux GNU EGCS 2.9.1.
I would like very much to praise an STL guide of the sort the present authors strove to give us, but regrettably, I must recommend that you give this one a miss in favor of more pithy texts such as Steve Teale's classic C++ IOStreams Handbook and Larry Nyhoff's C++: An Introduction to Data Structures, the latter for its first-rate treatment of STL containers.
Electronic Review of Computer Books