Learn more
These promotions will be applied to this item:
Some promotions may be combined; others are not eligible to be combined with other offers. For details, please see the Terms & Conditions associated with these promotions.
Your Memberships & Subscriptions
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the authors
OK
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices (C++ In-Depth)
Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on inconsequential matters, and simplify maintenance. Now, two of the world's most respected C++ experts distill the rich collective experience of the global C++ community into a set of coding standards that every developer and development team can understand and use as a basis for their own coding standards.
The authors cover virtually every facet of C++ programming: design and coding style, functions, operators, class design, inheritance, construction/destruction, copying, assignment, namespaces, modules, templates, genericity, exceptions, STL containers and algorithms, and more. Each standard is described concisely, with practical examples. From type definition to error handling, this book presents C++ best practices, including some that have only recently been identified and standardized-techniques you may not know even if you've used C++ for years. Along the way, you'll find answers to questions like
- What's worth standardizing--and what isn't?
- What are the best ways to code for scalability?
- What are the elements of a rational error handling policy?
- How (and why) do you avoid unnecessary initialization, cyclic, and definitional dependencies?
- When (and how) should you use static and dynamic polymorphism together?
- How do you practice "safe" overriding?
- When should you provide a no-fail swap?
- Why and how should you prevent exceptions from propagating across module boundaries?
- Why shouldn't you write namespace declarations or directives in a header file?
- Why should you use STL vector and string instead of arrays?
- How do you choose the right STL search or sort algorithm?
- What rules should you follow to ensure type-safe code?
Whether you're working alone or with others, C++ Coding Standards will help you write cleaner code--and write it faster, with fewer hassles and less frustration.
- ISBN-13978-0132654425
- Edition1st
- PublisherAddison-Wesley Professional
- Publication dateOctober 25, 2004
- LanguageEnglish
- File size7.4 MB
See all supported devices
Kindle E-Readers
- Kindle Scribe (3rd Generation)
- Kindle Scribe Colorsoft (1st Generation)
- Kindle Paperwhite (6th Generation)
- Kindle (11th Generation, 2024 Release)
- Kindle Oasis (10th Generation)
- Kindle Paperwhite (12th Generation)
- Kindle (11th Generation, 2022 Release)
- Kindle Oasis (9th Generation)
- Kindle Colorsoft (1st Generation)
- Kindle Scribe (2024 Release)
- Kindle Scribe (1st Generation, 2022 Release)
- Kindle Oasis (8th Generation)
- Kindle (8th Generation)
- Kindle Paperwhite (11th Generation)
- Kindle Paperwhite (7th Generation)
- Kindle Paperwhite (10th Generation)
- Kindle (7th Generation)
- Kindle (10th Generation)
- Kindle Voyage (7th Generation)
Fire Tablets
- Fire 7 (12th Generation)
- Fire HD 8 (12th Generation)
- Fire 10 HD (13th Gen)
- Fire HD 8 (8th Generation)
- Fire HD 10 Plus
- Fire HD 8 (10th Generation)
- Fire 7 (9th Generation)
- Fire HD 8 (12th Generation)
- Fire HD 10 (11th Generation)
- Fire Max 11 (13th Generation)
- Fire HD 8 (12th Generation)
- Fire HD 10 (9th Generation)
Free Kindle Reading Apps
- Kindle for Android Phones
- Kindle for iPhone
- Kindle for Android Tablets
- Kindle for iPad
- Kindle for Mac
- Kindle for Web
- Kindle for PC
Shop this series
See full series- Kindle Price:$142.97-By placing your order, you're purchasing a license to the content and you agree to the Kindle Store Terms of Use.
Sold by: Amazon.com Services LLC
- Kindle Price:$200.96-By placing your order, you're purchasing a license to the content and you agree to the Kindle Store Terms of Use.
Sold by: Amazon.com Services LLC
Shop this series
Sold by: Amazon.com Services LLC
Sold by: Amazon.com Services LLC
This option includes 3 books.
This option includes 4 books.
Why can't I get these titles?
Under regulatory requirements, teens need a parent or guardian to buy or borrow titles. Ask your parent or guardian to acquire these titles for this account from their device. These books will appear in your Kindle library once they do.
Customers who viewed this item also viewed
Customers also bought or read
- Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14
Kindle Edition$41.52$41.52 - C++ Software Design: Design Principles and Patterns for High-Quality Software
Kindle Edition$48.68$48.68 - C++ Memory Management: Write leaner and safer C++ code using proven memory-management techniques
Kindle Edition$28.49$28.49 - Large-Scale C++: Process and Architecture, Volume 1 (Addison-Wesley Professional Computing Series)
Kindle Edition$61.59$61.59 - C++ Low Latency: Multithreading and Hotpath Optimizations (Advanced C++ Programming Book 1)
Kindle Edition$4.99$4.99 - Head First Design Patterns: Building Extensible and Maintainable Object-Oriented Software
Kindle Edition$29.15$29.15 - C++ High Performance: Master the art of optimizing the functioning of your C++ code, 2nd Edition
Kindle Edition$37.67$37.67
Editorial Reviews
From the Back Cover
Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on inconsequential matters, and simplify maintenance. Now, two of the world's most respected C++ experts distill the rich collective experience of the global C++ community into a set of coding standards that every developer and development team can understand and use as a basis for their own coding standards.
The authors cover virtually every facet of C++ programming: design and coding style, functions, operators, class design, inheritance, construction/destruction, copying, assignment, namespaces, modules, templates, genericity, exceptions, STL containers and algorithms, and more. Each standard is described concisely, with practical examples. From type definition to error handling, this book presents C++ best practices, including some that have only recently been identified and standardized-techniques you may not know even if you've used C++ for years. Along the way, you'll find answers to questions like
- What's worth standardizing--and what isn't?
- What are the best ways to code for scalability?
- What are the elements of a rational error handling policy?
- How (and why) do you avoid unnecessary initialization, cyclic, and definitional dependencies?
- When (and how) should you use static and dynamic polymorphism together?
- How do you practice "safe" overriding?
- When should you provide a no-fail swap?
- Why and how should you prevent exceptions from propagating across module boundaries?
- Why shouldn't you write namespace declarations or directives in a header file?
- Why should you use STL vector and string instead of arrays?
- How do you choose the right STL search or sort algorithm?
- What rules should you follow to ensure type-safe code?
Whether you're working alone or with others, C++ Coding Standards will help you write cleaner code--and write it faster, with fewer hassles and less frustration.
About the Author
Herb Sutter is the author of three highly acclaimed books, Exceptional C++ Style, Exceptional C++, and More Exceptional C++ (Addison-Wesley). He chairs the ISO C++ standards committee, and is contributing editor and columnist for C/C++ Users Journal. As a software architect for Microsoft, Sutter leads the design of C++ language extensions for .NET programming.
Andrei Alexandrescu is the author of the award-winning book Modern C++ Design (Addison-Wesley, 2001) and is a columnist for C/C++ Users Journal.
Product details
- ASIN : B004ISL6I0
- Publisher : Addison-Wesley Professional
- Accessibility : Learn more
- Publication date : October 25, 2004
- Edition : 1st
- Language : English
- File size : 7.4 MB
- Screen Reader : Supported
- Enhanced typesetting : Enabled
- X-Ray : Not Enabled
- Word Wise : Not Enabled
- Print length : 418 pages
- ISBN-13 : 978-0132654425
- Page Flip : Enabled
- Part of series : C++ In-Depth
- Reading age : 18 years and up
- Best Sellers Rank: #1,597,497 in Kindle Store (See Top 100 in Kindle Store)
- #142 in C++ Programming Language
- #214 in Microsoft C & C++ Windows Programming
- #240 in C++ Programming
- Customer Reviews:
About the authors

Andrei Alexandrescu coined the colloquial term "modern C++", used today to describe a collection of important C++ styles and idioms. His eponymous book on the topic, Modern C++ Design: Generic Programming and Design Patterns Applied (Addison-Wesley, 2001), revolutionized C++ programming and produced a lasting influence not only on subsequent work on C++, but also on other languages and systems. With Herb Sutter, Andrei is also the coauthor of C++ Coding Standards: 101 Rules, Guidelines, and Best Practices (Addison-Wesley, 2004). Through Andrei's varied work on libraries and applications, as well as his research in machine learning and natural language processing, he has garnered a solid reputation in both industrial and academic circles. Since 2006, he has been second-in-command to Walter Bright, the D programming language inventor and initial implementer. Andrei has been the key designer of many important features of D and has authored a large part of D's standard library, positioning him to write an authoritative book on the new language, appropriately entitled, The D Programming Language. Andrei holds a Ph.D. in Computer Science from the University of Washington and a B.Sc. in Electrical Engineering from University "Politehnica" Bucharest. He works as a Research Scientist for Facebook.

Bjarne Stroustrup is the designer and original implementer of C++.
He is a founding member of the ISO C++ standards committee and a major contributor to modern C++.
He worked at Bell Labs and is now a professor at Columbia University and a fellow of Churchill College, Cambridge.
He is a member of the USA National Academy of Engineering, an ACM, IEEE, and CHM Fellow.
He is a recipient of the Draper Prize.
His publication list is as long as your arm. For details, see his home pages (www.stroustrup.com)

Herb Sutter is a recognized expert on C++ software development and regularly gives invited talks at conferences around the world. Author of more than 130 technical articles, Herb is also secretary of the ISO/ANSI C++ standards committee, contributing editor and columnist for C/C++ Users Journal, and former editor-in-chief of C++ Report. His popular "C++ Guru of the Week" series is published on the primary Internet newsgroup for the C++ language, comp.lang.c++.moderated, which he has moderated since its inception in 1995. Contact him at www.gotw.ca.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Generated from the text of customer reviewsSelect to learn more
Top reviews from the United States
- 5 out of 5 stars
Packed with time tested great advice
Reviewed in the United States on November 28, 2004This is a must read for intermediate level and higher programmers. One of the book's strengths is its conciseness, which makes it easier to read without getting tied up in a lot of details. Because of this, the reader must take it upon himself/herself to check the readings in the supplied references (given for each rule) to completely understand the terms/idioms/ideas mentioned in the rule. This is not at all a weakness in the book, as it's purpose is to summarize the rule/guideline/practice, so they can put it to use, while leaving it up to the reader to refer to readings in the given references, to obtain a greater understanding of the ideas used in that rule. Most of the references can be found in the authors' previous works. The book also makes reference to standard time tested design patterns and ideas, so it would be good to have the text "Design Patterns" read, or close by.
7 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport - 5 out of 5 stars
A must have for C++ professional (from novice to expert)
Reviewed in the United States on September 30, 2016I've been a programmer since the earliest 90's, a professional software engineer since the 2000, and I would say that book contains many of the things you learn through your carrier, exposed in a very pleasant way.
101 rules, mostly described in one or 2 pages make it a good reading before fall asleep, a good reminder of best practices that should not be forgotten. In these times, where code reviews are part of our daily activity, being aligned and focused makes the job more easy.
For novice it's for sure a good set of best-practices to be learned. For intermediate-expert it provides a clean and well focused reasoning on every single rule, good for tutoring and nice nuts of knowledge.
A must have.
4 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport - 4 out of 5 stars
Many good ideas
Reviewed in the United States on November 16, 2004I have great respect for both authors from reading their other books/articles, and there are many good ideas in this book, but I was expecting to agree with the authors here much more than I do.
Item 0: Don't sweat the small stuff. The authors say not to overlegislate naming and bracing standards, but they also say "do be consistent" and don't mix styles. From personal experience, I can say the only way to get a group of programmers to be consistent is by "sweating the small stuff" and having well-defined policies that are strictly enforced.
Item 1: Zero tolerance of warnings. Eliminating Level 4 warnings (in Visual C++) from a complex application (as opposed to a library intended for third-party use) is more trouble than it's worth. The authors' suggestion to decrease code readability (Examples 2 and 3) to get around these warnings is quite a bad idea, in my opinion.
Item 59: I wish somehow there could be a better answer to the C++ namespace issue. Giving many symbols (but not all, like preprocessor macros, classes not in a namespace, etc.) two names (the qualified and the unqualified) based on where that symbol appears seems so wrong and at the very least makes searching and cut-and-pasting more difficult.
The authors clearly prefer use of stl over custom containers (although they have not always followed their own advice), but they don't address many issues related to this, like are teams using stl supposed to use the peculiar stl naming practices across the board in all code, so stl dictates naming and all projects would use naming like some_stl_vector.push_back()? Or would code like m_object.DoSomething() be mixed together with the above statement so there really is no standard? What are programmers to do when the stl containers don't cut it and a custom container is needed? Should they write it in the stl idiom or consistent with their own naming standard?
Many of the examples refer to std::string, and even a few use const char *, in a book like this I would prefer not to see uses of these types that are not localization-friendly, since it is a best practices type of book, after all.
The book's proofreaders are very good but I believe they missed one error on Item 61, page 112, near the bottom: "Do not definite..." I'm assuming should be "Do not define..."
Anyway, I do recommend this book, and I do agree with most of the items, the authors raise many good points to consider when a team is deciding on its own coding standard.
91 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport - 5 out of 5 stars
One of the Best C++ Books I Have Read
Reviewed in the United States on September 3, 2010C++ Coding Standards is one of the best books about C++ that I have read, although I feel the title can be somewhat misleading. When the average programmer thinks "coding standard", their mind probably thinks of a crusty old document on their company wiki somewhere that tells them exactly how to lay out their curly brackets. This book is not that at all, but rather an awesome collection of C++ wisdom that should be useful to anyone using the language. Sutter and Alexandrescu write in a wonderful conversational style that reading this book is almost like sitting down for a chat with these two masters of C++ and software development.
I've learned a lot from this book, and it's a fantastic resource for C++ developers of all skill levels. Highly recommended!
2 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport - 5 out of 5 stars
Great Practical Advice
Reviewed in the United States on May 19, 2013Very easy to read. Much is advice each of us have already learned through experience. Many suggestions that we have not thought of but can relate to because of on the job learning. Some of the standards are violated by several of my customers and having worked in those environments it is clear how impotent the standard is. My Customers need to read this book.
Great to have easy to read practical lessons learned documented all in one place.
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport - 5 out of 5 stars
Think of this as a Miniature Roadmap that shows you how to avoid potholes on the roads
Reviewed in the United States on April 26, 2014Every programming language has a list of caveats and things you generally shouldn't do; although it is a bit outdated, many of the concepts are still very applicable to modern day C++ programming. However, this book really shines because it tells you the caveat and tells how what to look out for if you do decide to implement the design. So it doesn't take a "Don't ever do this" approach that many other design books take.
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport - 5 out of 5 stars
Like having a senior dev distill their career for you
Reviewed in the United States on November 20, 2021Such a great book to pick up, flip to a random page, and read. I’ve learned so many good practices.
One person found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport - 3 out of 5 stars
not bad, but very disappointed
Reviewed in the United States on July 26, 2005This book is for newbies. If you read a lot about c++ effective, c++ whatever series, this is not the book for you. It's not because the materials are easy, they've just been mentioned and referenced by books and internet for so LONG.
I personally think the word "Standards" in the title is just misleading and WRONG!!. That's also the reason I had high expectation from this book, but obviously made me very upset after reading it. I guess it was still my fault, because the book is obviously not organized systematically as indicated by the title.
So Read the book title three more times before you decide if it's the right book for u.
7 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport
Top reviews from other countries
Alec5 out of 5 starsGreat book - but there's a perfect time to read it
Reviewed in the United Kingdom on November 24, 2014This is a great book, it's not a reference book though.
Many C++ books are crap, they don't cross what I call "the Hello World gulf" this is the huge gap between examples and whatnot and actual programs and useful stuff.
This book helps the crossing. You should be okay on the Hello World stuff and just starting to write programs that do stuff (by this I mean have an IDE and GUI programs that respond to input, you know actual stuff - Eclipse CDT and WxWidgets FTW!) you'll pick this book up and find some of them are things you already do, or have already picked up without being told they are worthy of report.
The ones you don't know will be explained so well you can see why you'd want to do it that way.
There are other reviews praising this book already and I don't want to re-iterate those again (consider me in chorus with them though) this book is one of the best C++ books out there because it's actually useful in crossing that gulf.
Alec
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport
Amazon カスタマー5 out of 5 starsかなり良い
Reviewed in Japan on March 8, 2018Scott MeyersがEffectiveシリーズで詳しく説明してくれてはいるが少し冗長になってしまっているC++のベストプラクティスの指針をコンパクトにまとめてくれていると感じた。
この本とEffectiveシリーズ、ISOCppのCppCoreGuideline、あとGoogleのC++ Style Guideを読んでその作法に従っていれば、そのうちBjarne Stroustrupが言う「エレガントでシンプルな」コードに近づける気がする。
日本での参考書はただの「文法の羅列」であり、言語の物知りしか生み出さないような構成になっているが、本書のような本を読まなければ良いプログラマーにはなれないのだと読み進めていくうちにますます実感した
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport
Trevor Brenham2 out of 5 starsStill good stuff in there but you have to be aware ...
Reviewed in Canada on May 3, 2016I really should have looked at the publication date (2005). Much of the information is out of date given C++11. Still good stuff in there but you have to be aware that not all things apply for C++11. It is not the authoritative source I was looking for.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport
Oriol5 out of 5 starsIndispensable
Reviewed in Spain on June 4, 2015Éste es uno de los libros indispensables para cualquiera que quiera programar correctamente en c++.
Hay que tener en cuenta que no es un manual de programación, sinó que cita y argumenta las reglas esenciales para poder programar correctamente en c++.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport
Vikram5 out of 5 starsFive Stars
Reviewed in India on March 28, 2015Simple and Easy language. Clear Understandings.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try againWe'll check if this review meets our community guidelinesOpens in a new tab. If it doesn't, we'll remove it.
CancelReport






































