Product Details
Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition)

Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition)
By Scott Meyers

List Price: $49.99
Price: $32.25 & eligible for FREE Super Saver Shipping on orders over $25. Details

Availability: Usually ships in 24 hours
Ships from and sold by Amazon.com

65 new or used available from $19.99

Average customer review:

Product Description

"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 AG The 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.


Product Details

  • Amazon Sales Rank: #12823 in Books
  • Published on: 2005-05-22
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 320 pages

Features


Editorial Reviews

Amazon.com Review
This exceptionally useful text offers Scott Myers's expertise in C++ class design and programming tips. The second 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 author also provides a handful of suggestions for general class design, including strategies for using different types of inheritance and encapsulation. Never doctrinaire and always intelligent, these guidelines can make your C++ classes more robust and easier to maintain. --Richard Dragan

Review
Read the full review for this book.

Effective C++ CD is the HTML (Netscape-oriented) version of Scott Meyers' previous two works, Effective C++, Second Edition and More Effective C++. Additionally, five supplementary magazine articles appear in the collection. There are also links to relevant material on the Web which that been added to the current edition and which did not appear in the print edition.

Scott Meyers' work is so well known as scarcely to need introduction. Respect for his C++ acumen and pedagogic skills is so widespread that I was prepared to thoroughly detest his work, which I have encountered often but barely deigned to read to date.

On close examination, I find Meyers' books to be superb.

Of the 50 catechismic "Items" in the body of Effective C++, the vast majority are of critical importance to solid C++ programming. Virtually everything Scott Meyers suggests on these subjects is germane and practical. Where one could conceivably differ with Meyers' approach, his is nevertheless an entirely sound approach.

The second volume, More Effective C++, is cast in the same mold as the first volume. Here the discussion of 35 further "Items" tends to devolve somewhat towards matters of style. However, these are still critical issues being raised that the intermediate C++ programmer must confront sooner or later, athey are shipped too early. They fail because they arenthey are shipped too early. They fail because they arens presented in Meyers' rich and sympathetic tutorial prose. --Jack Woehr, Dr. Dobb's Journal -- Dr. Dobb's Journal

From the Inside Flap
This book is a direct outgrowth of my experiences teaching C++ to professional programmers through the Institute for Advanced Professional Studies. I found that most students, after a week of intensive instruction, felt comfortable with the basic constructs of the language, but were less sanguine about their ability to put the constructs together in an effective manner. Thus began my attempt to formulate short, specific, easy-to-remember guidelines for effective software development in C++: a summary of the things that experienced C++ programmers either almost always do or almost always avoid.

As a computer scientist, I was originally interested in rules that could be checked by a machine. To that end, I outlined a program to examine C++ software for constructs that were "almost always wrong." Currently under development, this checking program has become known as lint++. However, it quickly became apparent that the great majority of the guidelines used by good C++ programmers were too difficult to formalize, or had too many important exceptions, to be blindly enforced by a lint++-like program.

That led me to the notion of something less precise than a computer program but still more focused and to-the-point than a general C++ textbook. The result you now hold in your hands: a book containing 50 specific suggestions on how to improve your C++ programs and designs.

In this book you'll find advice on what you should do, and why, and what you should not do, and why not. Fundamentally, of course, the whys are much more important than the whats, but from a purely pragmatic point of view, it is much more convenient to have a list of guidelines in front of you than it is to memorize a textbook or two. Unlike most books on C++, my presentation here is not organized around particular language features. That is, I don't talk about constructors in one place, aboutvirtual functions in another, about inheritance in a third, etc. Instead, each explanation is tightly coupled to the specific guideline it accompanies, and my coverage of the various aspects of a particular feature is typically dispersed throughout the book.

The advantage of this approach is that it better reflects the complexity of the software systems for which C++ is often chosen, systems in which the understanding of individual language features is not enough. For example, experienced C++ developers know that understanding inline functions and understanding virtual destructors does not necessarily mean that you understand inline virtual destructors. Such battle-scarred developers recognize that comprehending the interactions between the features in C++ is of the greatest possible importance in using the language effectively. The organization of this book reflects that fundamental truth.

The disadvantage of my approach is that you may have to look in more than one place to discover everything I have to say about a particular construct in C++. To minimize the inconvenience inherent in this approach, I have sprinkled cross-references liberally throughout the text, and a comprehensive index is provided at the end of the book.

The set of guidelines in this book is far from exhaustive, but coming up with good rules - ones that are applicable to almost all applications almost all the time - is harder than it looks. Perhaps you know of additional guidelines, of more ways in which to program effectively in C++. If so, I would be delighted to hear about them.

On the other hand, you may feel that some of the items in this book are inappropriate as general advice; that there is a better way to accomplish a task examined in the book; or that one or more of the technical discussions is unclear, incomplete, or misleading. I encourage you to let me know about these things, too.

Donald Knuth has a long history of offering a small reward for people who notify him of errors in his books. The quest for a perfect book is laudable in any case, but in view of the number of bug-ridden C++ books that have been rushed to market, I feel especially strongly compelled to follow Knuth's example. Therefore, for each error in this book that is reported to me - be it technical, grammatical, typographical, or otherwise - I will, in future printings, gladly acknowledge the first person to report that error.

Send your suggested guidelines, your comments, your criticisms, and - sigh - your bug reports to:

Scott Meyersc/o Editor-in-Chief, Corporate and Professional Publishing Addison-Wesley Publishing Company 1 Jacob Way Reading, MA 01867 U. S. A.

Alternatively, you may send electronic mail to johnw@aw.com.

I maintain a list of changes to this book since its first printing, including bug-fixes, clarifications, and technical updates. This list is available via anonymous FTP from the Internet site ftp.aw.com in the directory cp/ec++. If you would like a copy of this file, but you lack access to the Internet, please send a request to one of the addresses above, and I will see that the list is sent to you.

Scott Douglas Meyers Providence, RI November 1991


Customer Reviews

Don't write C++ code without it...5
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 oragization 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 implemantation 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.

Terrific coverage of fundamental C++ techniques4
An absolutely terrific book focusing on basic C++ and object-oriented programming techniques. A crucial book for anyone new to C++ to read.

While _Effective C++_ is an important and fundamental part of any C++ programmer's library, truly advanced C++ engineers are likely familiar with most or all of the techniques presented here (dynamic allocation, constructors, basic coding style, etc.). Scott Meyers' second book, _More Effective C++_, covers significantly more advanced techniques which the experienced programmer may not have encountered in everyday code and which may be more instructive. It is only in deference to that book that I have given this one 4 (or, if I could, 4.9) stars.

Third Edition: Improving an already great book5
How do you improve a book that has been known as a "bible" in the C++ community for years? As Scott mentions at the beginning of the text, he almost threw everything out, and started from scratch. When I first say the book, I thought that there are five new items that were added to the book, but I couldn't be more wrong. As you might have guessed, C++ has gone thru a number of significant changes over the past decade, and the third edition of this book is updated to take advantage of the new editions to the C++ standard. In reality, almost every item in this book has gone thru a re-write. Many have been consolidated and new chapters, topics and many new items have been added. A few items that did not make sense anymore like items 2, 3 and 4 in the second edition are removed from this third edition.

Scott breaks down the c++ language into 4 subparts:
* The old C subsystem. Before all these advanced programming languages such as Java and .NET came, C was the language of choice. C++ is "translated" to C first, and then complied and linked to an executable.
* OO C++, which is C with Classes. This is where the concept of Object Orientation in C++ started. Even though this concept was very much new a decade ago, it is very much part of a programmer's vocabulary.
* Template C++, which is the newest edition to the C++ standard and it brings with it the concept of Template Metaprogramming. This concept is very much new, and this book has dedicated a whole chapter around templates, and template metaprogramming.
* STL, which is the C++ Standard Template Library. Again, STL was a new concept a few years back, but it is very much an established notion in C++.

Scott has taken a new approach to this book and has covered all four of these subparts. He has a book dedicated to STL, but he is using STL notions and "language" throughout this book. The chances are that the reader is already familiar with other languages such as Java and .Net, so the text covers area where these two languages differ with C++, especially in the area of inheritance and polymorphism. But not everything has changed. Topics such as,"Explicitly disallow the use of Compiler Generated functions you do not want," will never get old or outdated.

New chapters cover topics such as C++ Template and Generic Programming, Resource Allocation and topics that cover the latest C++ standard and additions, including the TR1 (Technical Report 1). "new and delete" have been separated into their own chapter, and the author goes into great depth demonstrating to the reader the various ways that these two operators can be modified, and why.

Exceptions and programming in light of exceptions is also a very new concept in C++. The previous versions on this text did not touch on exceptions all that much, but the author has spread the use of exceptions throughout the text, with a number of items dedicated explicitly to exceptions and exceptions handling.

The updated items, new topics and chapters and a new look and feel of the text with color coded examples make this book a joy to for C++ programmer to read.