100 C++ Mistakes and How to Avoid Them
eBook - ePub

100 C++ Mistakes and How to Avoid Them

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

100 C++ Mistakes and How to Avoid Them

About 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
• 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.

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

Trusted by 375,005 students

Access to over 1 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Publisher
Manning
Year
2025
eBook ISBN
9781638357315

Table of contents

  1. 100 C++ Mistakes and How to Avoid Them
  2. Copyright
  3. contents
  4. front matter
  5. 1 C++: With great power comes great responsibility
  6. Part 1. Modern C++
  7. 2 Better modern C++: Classes and types
  8. 3 Better modern C++: General programming
  9. 4 Better modern C++: Additional topics
  10. Part 2. Transitional C++
  11. 5 C idioms
  12. 6 Better premodern C++
  13. Part 3. Classic (premodern) C++
  14. 7 Establishing the class invariant
  15. 8 Maintaining the class invariant
  16. 9 Class operations
  17. 10 Exceptions and resources
  18. 11 Functions and coding
  19. 12 General coding
  20. index

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access 100 C++ Mistakes and How to Avoid Them by Rich Yonts in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming. We have over one million books available in our catalogue for you to explore.