“Every C++ professional needs a copy of Effective C++. It is an absolute must-read for anyone thinking of doing serious C++ development. If you’ve never read Effective C++ and you think you know everything about C++, think again.”
— Steve Schirripa, Software Engineer, Google“C++ and the C++ community have grown up in the last fifteen years, and the third edition of Effective C++ reflects this. The clear and precise style of the book is evidence of Scott’s deep insight and distinctive ability to impart knowledge.”
— Gerhard Kreuzer, Research and Development Engineer, Siemens AGThe first two editions of Effective C++ were embraced by hundreds of thousands of programmers worldwide. The reason is clear: Scott Meyers’ practical approach to C++ describes the rules of thumb used by the experts — the things they almost always do or almost always avoid doing — to produce clear, correct, efficient code.
The book is organized around 55 specific guidelines, each of which describes a way to write better C++. Each is backed by concrete examples. For this third edition, more than half the content is new, including added chapters on managing resources and using templates. Topics from the second edition have been extensively revised to reflect modern design considerations, including exceptions, design patterns, and multithreading.
Important features of Effective C++ include:
- Expert guidance on the design of effective classes, functions, templates, and inheritance hierarchies.
- Applications of new “TR1” standard library functionality, along with comparisons to existing standard library components.
- Insights into differences between C++ and other languages (e.g., Java, C#, C) that help developers from those languages assimilate “the C++ way” of doing things.
Table of Contents:
Preface.
Acknowledgments.
Introduction.
1. Accustoming Yourself to C++.
Item 1: View C++ as a federation of languages.
Item 2: Prefer consts, enums, and inlines to #defines.
Item 3: Use const whenever possible.
Item 4: Make sure that objects are initialized before they're used.
2. Constructors, Destructors, and Assignment Operators.
Item 5: Know what functions C++ silently writes and calls.
Item 6: Explicitly disallow the use of compiler-generated functions you do not want.
Item 7: Declare destructors virtual in polymorphic base classes.
Item 8: Prevent exceptions from leaving destructors.
Item 9: Never call virtual functions d