Effective C++: 55 Specific Ways to Improve Your Programs and Designs

Effective C++

This exceptionally useful text offers Scott Myers’s expertise in C++ class design and programming tips. The third edition incorporates recent advances to C++ included in the ISO standard, including namespaces and built-in template classes, and is required reading for any working C++ developer.

The book opens with some hints for porting code from C to C++ and then moves on to the proper use of the new and delete operators in C++ for more robust memory management. The text then proceeds to class design, including the proper use of constructors, destructors, and overloaded operator functions for assignment within classes. (These guidelines ensure that you will create custom C++ classes that are fully functional data types, which can be copied and assigned just like built-in C++ classes.)

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.

Andrew Harbick writes about this book

From beginning to end this book is packed with information that is IMMEDIATELY applicable. For example “Always declare destructors to be virtual” otherwise you may end leaking memory when subclasses are deleted. Or hiding the implementation of a class in an “Impl” that your class just passes through to. That way, if the implementation changes, the clients of the class are protected from recompilation.

Beyond the wealth of just downright practical information the organization is fabulous. The only other technical book that has organization as good as this one is “Design Patterns” There are several chapters such as “Memory Management” that have “Items” and each item has a few paragraphs describing the motivation for why you should believe Meyers with examples to prove it. Then there are solid examples that show the implementation of an example usage.

My company gave this book out with “Design Patterns” to EVERY developer in the company, and it was probably the smartest thing I’ve ever seen a company do.

Read it and learn a TON.

Click here to buy Effective C++: 55 Specific Ways to Improve Your Programs and Designs

M. Saqib: Saqib is Master-level Senior Software Engineer with over 14 years of experience in designing and developing large-scale software and web applications. He has more than eight years experience of leading software development teams. Saqib provides consultancy to develop software systems and web services for Fortune 500 companies. He has hands-on experience in C/C++ Java, JavaScript, PHP and .NET Technologies. Saqib owns and write contents on mycplus.com since 2004.
Related Post