
100 C++ Mistakes and How to Avoid Them
Explore common production C++ mistakes through concrete examples and techniques for improving code.
- Themes
- Improving C++ code quality, Maintaining legacy applications, Replacing outdated C++ idioms
Production C++ Mistakes
Come here for
- Practical techniques for diagnosing legacy applications
- Examples of C++ mistakes from production codebases
Expect
- Coverage of classes, resource management, exceptions, and C-style idioms
- Step-by-step walkthroughs for improving readability, effectiveness, and performance
Where it sits
How strongly BookFrontier reads the book as belonging to each subject.
Nearest books
Matched by our semantic model. Ordered by what its readers also loved.
Effective Modern C++Scott Meyers69% subject matchShares C++ Programming and Object-Oriented Programming
Learn C++ by ExampleFrances Buontempo66% subject matchShares C++ Programming and Object-Oriented Programming
Exceptional C++ StyleHerb Sutter64% subject matchShares C++ Programming and Object-Oriented Programming
More Effective C#Bill Wagner64% subject match
C++ Crash CourseJosh Lospinoso63% subject matchShares C++ Programming and Object-Oriented Programming
Modern C, Third EditionJens Gustedt62% subject match
Working Effectively with Legacy CodeMichael Feathers62% subject match
Tiny C ProjectsDan Gookin62% subject match
For younger readers: The CS Detective
Start with three books, and this one can be the first.
Members get a new edition every morning: a route out from their books to essays, research and talks, with the reason for each.
Sign upAbout this book
Learn how to handle errors, inefficiencies, and outdated paradigms by exploring the most common mistakes you’ll find in production C++ code.
100 C++ Mistakes and How To Avoid Them reveals the problems you’ll inevitably encounter as you write new C++ code and diagnose legacy applications, along with practical techniques you need to resolve them.
Inside 100 C++ Mistakes and How To Avoid Them you’ll learn how to:
• Design solid classes
Continue reading
• Minimize resource allocation/deallocation issues
• Use new C++ features
• Identify the differences between compile and runtime issues
• Recognize C-style idioms that miss C++ functionality
• Use exceptions well
100 C++ Mistakes and How To Avoid Them gives you practical insights and techniques to improve your C++ coding kung fu. Author Rich Yonts has been using C++ since its invention in the 1980s. This book distills that experience into practical, reusable advice on how C++ programmers at any skill level can improve their code. Unlike many C++ books that concentrate on language theory and toy exercises, this book is loaded with real examples from production codebases.
Purchase of the print book includes a free eBook in PDF and ePub formats from Manning Publications.
About the technology
Over ten billion lines of C++ code are running in production applications, and 98-developers find and fix mistakes in them every day. Even mission-critical applications have bugs, performance inefficiencies, and readability problems. This book will help you identify them in the code you’re maintaining and avoid them in the code you’re writing.
About the book
100 C++ Mistakes and How To Avoid Them presents practical techniques to improve C++ code, from legacy applications to modern codebases that use C++ 11 and beyond. Author Rich Yonts provides a concrete example to illustrate each issue, along with a step-by-step walkthrough for improving readability, effectiveness, and performance. Along the way, you’ll even learn how and where to replace outdated patterns and idioms with modern C++.
What's inside
• Design solid classes
• Resource allocation/deallocation issues
• Compile and runtime problems
• Replace C-style idioms with proper C++
About the reader
Covers C++ 98 through 23, with an emphasis on diagnosing and improving legacy code.
About the author
Rich Yonts is a Senior Software Engineer at Teradata and a long-time software engineer using C++, Java, and Python. He has held a number of technical and leadership roles during his many years at IBM and Sony.
Table of Contents
1 C++: With great power comes great responsibility
Part 1
2 Better modern C++: Classes and types
3 Better modern C++: General programming
4 Better modern C++: Additional topics
Part 2
5 C idioms
6 Better premodern C++
Part 3
7 Establishing the class invariant
8 Maintaining the class invariant
9 Class operations
10 Exceptions and resources
11 Functions and coding
12 General coding
Publisher details
Publisher categories
- Programming Basics
- C++ Programming
- Software Development
- Authors
- Rich Yonts
- Publisher
- Manning
- Published
- March 25, 2025
- Format
- Print & ebook
- Reading lane
- Programming Basics