In his book The C++ Programming Language, Stroustrup gives a bottom-up overview of the C++ programming language. One of the most interesting parts of the book is that Strupstrup, as the designer of C++, gives you his opinions as to how C++ should be used. He explains how the features of C++ support various programming paradigms - procedural programming, modular programming, object-oriented programming, and generic programming. In fact, he devotes an entire section (three chapters) of the book to explaining how C++ should be used to produce object-oriented systems.

The discussion is fairly philosophical and dense at times. Sometimes you'll have to reread a sentence a few times to understand what it means. You get the feeling that Stroustrup is more interested in providing an analytical study of the language rather than a How-To. The book is definitely not for people new to object-oriented programming. I don't think it's ideal even for people who are new to C++ but already know OOP. This book is recommended for C++ experts who want a deeper understanding of the language. It's definitely easier reading than a copy of the C++ standard.

Stroustrup also gives a lot of detail on the obscure features in the language. However, he does not give enough detail for the book to replace a copy of the C++ standard. Often, the details for a particular feature are not consolidated in one place and can be hard to find. In that sense, this book doesn't serve very well as a reference manual either.

This is one of very few books I own for which it has been very much worth buying each new edition. The book largely covers how Stroustrup thinks you should use C++, and contains examples of good use of C++ and good OO programming style in general.

The first edition (copyright 1986) was 328 pages, and written in a very similar style to The C Programming Language.

The second edition (copyright 1991) was 669 pages, with more examples and added material covering features added to the C++ language since 1986. New features covered include overloading resolution, memory management, minor changes to C compatibility, multiple inheritance, static and const member functions, protected, templates, and exception handling.1 This edition was not designed to be read linearly. Parts of the end of each chapter were marked as "advanced material" and were best read on the second or third (or fourth) reading of the book and skipped on the first reading.

The third edition of the book (copyright 1997, 1020 pages) covers features added to the language such as namespaces, run time type identification, more template features, and a Standard (std) C++ library.2 In addition to adding material covering features added to C++ in the interim, Stroustrup rewrote much of the convoluted material from the second edition, and it is now much easier to read linearly. As a consequence of this (as jprockwell mentioned), the details of a feature may be scattered through various parts of the book, as to not give too much detail all at once, and focus on the basic stuff first.


All three editions strive to cover portable features of C++ that are well implemented in all compilers of the edition's time. However, Stroustrup admits2 that some compilers do not fully implement some of the newer features in the C++ standard. In the third edition, for instance, he hints at problems with template linkage, especially with respect to the export keyword, which might require a smart linker that can re-invoke the compiler to create missing template instantiations. (Workaround: explicit instantiations) There is an appendix that suggests workarounds for incomplete implementations, as well as problems to expect when porting legacy C and C++ to newer compilers and newer language features. Throughout the book, Stroustrup takes every opportunity available to offer advise, tips, and suggestions. The third edition especially has entire sections and even whole chapters devoted just to programming style and methodology.


1 preface to the second edition
2 chapter 1, third edition

Log in or registerto write something here or to contact authors.