Jump to ratings and reviews
Rate this book

Effective C++#1

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

Rate this book
The Barnes & Noble Review
Since early in the 90s, working C++ programmers have relied on Scott Meyers sEffective C++to dramatically improve their skills. But the state-of-the-art has moved forward dramatically since Meyers last updated this book in 1997. (For instance, there s now STL. Design patterns. Even new functionality being added through TR1 and Boost.) So Meyers has done a top-to-bottom rewrite, identifying the 55 most valuable techniques you neednowto be exceptionally effective with C++.


Over half of this edition s content is new. Templates broadly impact C++ development, and you ll find them everywhere. There s extensive coverage of multithreaded systems. There s an entirely new chapter on resource management. You ll find substantial new coverage of exceptions. Much is gained, but nothing s lost: You ll find the same depth of practical insight that first madeEffective C++a classic all those years ago.Bill Camarda, from the July 2005href= "http://www.barnesandnoble.com/newslet... Only

297 pages, Paperback

First published January 1, 1991

Loading interface...
Loading interface...

About the author

Scott Meyers

22books118followers
Scott Douglas Meyers is an American author and software consultant, specializing in the C++ computer programming language. He is known for his Effective C++ book series. During his career, he was a frequent speaker at conferences and trade shows.

Ratings&Reviews

What doyouthink?
Rate this book

Friends&Following

Create a free accountto discover what your friends think of this book!

Community Reviews

5 stars
1,840 (55%)
4 stars
1,080 (32%)
3 stars
327 (9%)
2 stars
52 (1%)
1 star
23 (<1%)
Displaying 1 - 30 of 137 reviews
Profile Image for Erik Nilson.
15 reviews9 followers
October 3, 2019
Easy to follow book. Very CLEAR explanations without a bunch of fluff. Great answers to the whys that you ask when designing software.
Profile Image for Elliott Bignell.
319 reviews34 followers
April 11, 2015
I have owned this book for several years and typically re-read it about every year or so. To say that a book is necessary reading is sometimes hyperbolic, but if you want to understand C++ then it is the simple truth in this case. Meyers has written three books on C++ - this volume, "More Effective C++" and "Effective STL". You, fellow programmer, need them all. Plus "Design Patterns", of course. Stroustrup and the ACR probably belong beside them, but Meyers is uniquely readable - easily the best author in the ill-specified and degenerate language we refer to as "English" among all those writing about real languages spoken by real hardware. He's even funny, despite writing in a genre whose adherents usually require humour explained with diagrams. As the other books are more advanced and/or more impenetrable, this book should be the first one you read. Some C++ experts will disagree with me here, as you do need to know the basics to get the best out of this book, and they will point to Stroustrup. I have a copy of that, but I would not describe it as learning material; it is reference material. You can actually read Meyers for pleasure and for learning, and that's an unusual combination in our cloistered and obsessive developers' world.

Meyers will help you get the best out of C++. If you can write classes in Java or, God forbid, Visual Basic, then you can certainly write them in C++ and come up with a working piece of software. That is not the same as using the language effectively. C++ is a work of beauty, but it has many pitfalls and it requires some depth of knowledge to get the best out of it. It's also portable, and Meyers knows how to write portable code, which must surely be a consideration with Linux and Apple advancing into the market. All genuine C++ compilers comply with an ISO/ANSI standard, which in theory means that properly-designed C++ code will compile on any conformant compiler and can be ported to any chipset for which a compiler exists. In practice, of course, this is not quite so easy. Meyers is very familiar with the standard and has been involved in its evolution, which along with his experience of developing in C++ positions him perfectly to point out where portability can and cannot be taken for granted.

The book is divided into 55 items, any of which will do you nicely for the train-journey to work. It is divided into "Shifting from C to C++", "Memory Management", "Constructors, Destructors and Assignment Operators", "Classes and Functions: Design and Declaration", "Classes and Functions: Implementation", "Inheritance and Object-Oriented Design" and "Miscellany". This covers a lot of ground, but for my money the material on operators and that on object-oriented design are the best value. User-defined operators are the kind of thing that has C++ developers hugging themselves for joy at the sheer coolness of the language, while object-oriented design is a set of concepts that are to some extent framed by the language - you need to know what they "mean" in C++ in order to see what you can do with the language. In general, Meyers will have you writing classes that are smaller, express their purpose more clearly and are less prone to generate impenetrable bugs at run-time, all of which are worthy design goals. Do it right and your errors will come up at compile or at link time (Item 46), and this is a good thing; let the compiler and the strong typing do your debugging before the bugs ever run.

Required reading. I mean it!

See also list:
More Effective C++: 35 New Ways to Improve Your Programs and Designs
Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library
Design Patterns: Elements of Reusable Object-Oriented Software
Comment
Profile Image for Nick Black.
Author2 books843 followers
December 20, 2008
A necessary reference for anyone doing professional C++, but what this book really ought tell you is that professional C++ is a terrible idea.
Profile Image for Farsan Rashid.
36 reviews17 followers
April 25, 2018
Only read If you are going to work professionally in C++ for the next couple of years.C++ gives you freedom to do lots of things the way you like and this is how things can go wrong in so many ways. This book is focused on teaching how to write bug free C++ code rather than creating maintainable object oriented solution. Again this book is very much C++ specific so read it to learn about C++ pitfalls and advice to avoid them.
Profile Image for يوسف بوحايك.
Author1 book125 followers
April 4, 2018
My second reading to Scott Meyers, and this one was a confirmation to the elegant style of this great writer.

I'm not full aware of all what exists as books for C++ programming, though, I'm pretty sure that Scott's books are from the best out there, simply because it's not easy at all to have such a clear, simple and coherent understanding of the basic philosophy on which this complex language is built, prior to be able to write such a wonderful text.

Can't wait to read his other two books (More effective and Effective STL), thank you Scott for all of these marvels.

5 stars without even thinking, absolutely recommended.
Profile Image for Moritz.
46 reviews2 followers
February 6, 2021
C++ is a language that is impossible to learn "by doing", many things just need to be explained. That is why it is essential to have books like this one.

Some items are a little bit dated and I preferred Effective Modern C++. But a great read nevertheless. A must for people interested in C++.
Profile Image for Mehmet Çetin.
14 reviews2 followers
October 20, 2018
This book is one of the rare software development books I have read by highlighting at least a sentence on every page. It was hard to grasp more than 20/30 pages at once for me. I highly recommend this book to who wants excel at being a better class designer. The sections related to smart pointers, templates, and template metaprogramming are superb. I don't recommend this book if you do not have at least some experience on STL and some basic knowledge of C++ programming. The level of customization and optimization power on your hands with C++ on objects and their lifecycle is non-comparable with any other major programming language. This book helps you to avoid hurting yourself with that power on some concepts and how to utilize that power at a maximum when needed. Highly recommend.
Profile Image for Gerda Zsejke.
5 reviews4 followers
November 28, 2020
C++ is amazing.... ly complex, but that is its beauty. If you want to learn a language in what you can get results quickly and it is easy to program with, you should look for another one. The book is a good start to study the language in-depth. I really liked that wasn't just pure theory, there were several examples that showed how a specific suggestion, called Item in the book, improves the quality of the code. After finishing the book, I can read and understand C++ code easier, and understand the why-s of the language.
Profile Image for Aliaksei Ivanou.
111 reviews4 followers
August 19, 2021
Отличная книга, содержащая много интересных аспектов С++. Книга довольно-таки старая, но меж тем, все равно довольно-таки актуальная, так как затрагиваются важные всегда темы: конструкторы и деструкторы, операторы присваивания, управление ресурсами, некоторые нюансы проектирования программ и объявления, наследование и объектно-ориентированное проектирование, шаблоны и обобщенное программирование, настройка new и delete. Радует, что автор не просто перечисляет возможности языка, но и дает рекомендации о том, когда что использовать нужно и когда, наоборот, не стоит. Книга не самая объемная по тексту, но знаний, советов и рекомендаций тут вагон.
Profile Image for Mike.
154 reviews2 followers
May 19, 2020
I have a love/hate relationship with this book.

On the one hand, it is wonderful to have all of the details of C++ revealed and the many many many pitfalls identified. This is great.

On the other hand, I hate that C++ is such an awful language that a book like this is required!

As this book highlights, there are so many places in C++ where doing what looks like the right thing turns out to be the wrong thing. One simple example is that items in the constructor initialization list are not executed in order, instead, they are executed in the order that the items are declared in the class. Once you know that, it makes sense and is reasonable. But, unless someone tells you about this behavior, the natural assumption is that the initialization statements in the list would execute in order, just like everything else. Of course, for sane programs, the order of initialization in the list shouldn't matter but that's not the point. The point is that the behavior is non-obvious.

That being said, I do believe it is essential that anyone who is going to write C++ professionally should read and understand this book.



6 reviews
October 4, 2009
Most books on c++ just list features of the language, without really explaining when should you use them and how to combine them. This books does so. It will help you design cleaner, more stable, well formed, and efficient programs in C++.

Here are some of the most valueable (for me) subjects found in this book:

- Efficient memory management when you need it
- Proper mechanisms to use to express yourself when writing classes - when to use templates, single inheritance, private inheritance; multiple inheritance and member inclusion - that is, expressing relations like "implemented using", "has" and "is a".
- Division of interface and implementation
- Sharing code between classes
- Reducing the compile dependencies between files
- Some coding errors to watch out for which the compiler cannot catch
- Reducing runtime errors

And many more. The author of the book writes really clean and the book is easy to read. The examples are clean and to the point.

Overall, I strongly recommend this book.
211 reviews1 follower
December 24, 2021
I have a doctorate degree in an area related to Computer Science. When I was applying for jobs a few years after graduate school (mid 2000s), someone told me that I should learn C++ or Java. (I had C and Pascal listed as the two most "modern" language that I had familiarity with.) I went to C++ first and absolutely hated it. Then I went to Java, which was better.

What I didn't like about C++ is that C++ is built on top of C, not approached as an entirely new language. As such, it has the worst of both worlds (in addition to the best of both worlds). The whole language seems like a bunch of kludges.

And now, this book comes into the discussion. This is the sort of book you need(ed) in order to write... well, effective... programs in the language, as opposed to (say) only using C's constructs. This book is a bit on the old side (1992) but does what it sets out to do, with an occasional bit of humor.

(BTW, my copy says 50 Specific Ways, not 55.)
Profile Image for Mikhail Filatov.
288 reviews11 followers
August 8, 2020
This book definitely has not aged well. While a lot of books from the same time are still classics - like Design patterns- this book is 60+% about tricks and issues of C++ compilers circa 1993-94.
There are some interesting topics about OOP design (isa/hasa) but they are covered much better by GoF book anyway.
Profile Image for Jamie.
71 reviews16 followers
August 18, 2023
THE first C++ book I’ve read cover to cover, and it does it’s job. The tips and examples are relevant, clear, and informative. Honestly, I think this book was the key factor from taking my skills from beginner to advanced. I only wish there was a single book combining this with Scott MeyersEffective Modern C++,which addresses value forwarding and other goodies in C++14.
Profile Image for Jaewoo.
58 reviews
March 8, 2014
??
This entire review has been hidden because of spoilers.
52 reviews15 followers
June 8, 2019
Many of the ideas in this book have already been made a part of the c++ "common sense" canon. As a result, a third of the material was superfluous. What was left-over was split into: useful-to-know and "wow this is a cursed c++ feature that I never want to use but I'm glad I know about".

Some people have the approach of learning c++ that requires you to know all c++ developments between 1998 and 2011. I take this approach, but I can't help but feel that there's a more efficient way to gain the knowledge of the gotchas and evolution than reading this book. At least I would suggest skimming the items for ttopic that interest you most, and reading those.

This was read as a part of a professional book-club.
Profile Image for Matt Rozak.
52 reviews39 followers
January 29, 2020
Mandatory prerequisite before reading Effective Modern C++. You also need to refer to Effective Modern C++ alongside this book as some of the items are no longer relevant in C++11+.

If you think you know C++ and you haven't read this book you probably don't actually know C++. Fantastic book - only con is that a lot of points are not as relevant for modern C++ codebases. Would be 5 stars, but ideally this book and Effective Modern C++ would just be merged into one text and drop any pre C++11 discussion.
Profile Image for Diogo Muller.
672 reviews8 followers
April 30, 2020
There is a reason this is considered an essential book by many C++ programmers: It contains many great tips, hints and best practices for working with C++, but it's also written in a way that is not only clear and easy to understand, but also doesn't feel too dry or fatigating to read.

While it's not up to date with C++ standards (the third edition of this book, which I've read, is from 2005), many of the basics here are still well valid today. The author also has a modern C++ book, which I plan to read in the future.

This is an easy recommendation for anyone who wants to work with C++.
Profile Image for Yash Patel.
173 reviews7 followers
March 1, 2020
Meh, implementation details are never really that interesting. But Meyers has compiled a decent list of items that are specifically stated with accompanying examples to give weight behind his points. This book seems best suited for people with some experience with the language but not too much (~6-12 months), since most of the problems won't really have a whole lot of concrete context before then and after then you'll probably have seen most of these issues yourself.
68 reviews
November 30, 2018
With some small exceptions (auto_ptr, lack of final classes, etc.), this book is still relevant for modern c++. I think I'm going to print some of the items' titles and have them on my desk at all times - c++ is such a complex language it is easy to misuse it.
Useful and light read (for a c++ book).
Profile Image for Freddy Foobar.
4 reviews1 follower
January 20, 2020
Still an excellent book. Some of the recommendations might seem obvious, but the explanations given for why you would want to do something, and the sort of pitfalls you can stumble into if you don't, make it valuable. The book is pretty easy to follow, and doesn't require you to be a C++ expert to understand.
37 reviews
December 27, 2018
It's hard to be fair here because I've known about most of the used techniques.
Nevertheless, some things surprised me and illustrating everything with examples are the reasons for a high grade for this book.
Profile Image for Mickey Kawick.
15 reviews1 follower
February 19, 2017
A little dated and since I have already adopted most of the practices, it felt a little irrelevant. Still, fantastic recommendation with the noobs out there.
Profile Image for Joel B Pryde.
24 reviews
June 15, 2017
Completely essential if you are a C++ programmer. I'd read some of this but decided to revisit it after reading Meyers's "Effective Modern C++" (also a fantastic book).
Profile Image for Miro.
88 reviews2 followers
October 9, 2018
Inspiring, but I thought there will be more. May be because I have already 15+ years of experience and this is 12 years old edition. Still, half interesting, half boring.
Profile Image for David Pearlman.
3 reviews1 follower
November 16, 2018
This should be required reading for anyone writing C++. I wish I read this years ago. On to the newer version that talks about c++11/14 features
Displaying 1 - 30 of 137 reviews

Can't find what you're looking for?

Get help and learn more about the design.