Everything you need to start to train your critical thinking and help you catch bugs today.

25 real-world C++ cases explained in detail, covering lifetimes, integer promotion, data races and real-time safety for all levels of C++ developers.

This is the most valuable piece of text I have ever read as a CS major

Muhammad T

What I've put together

It’s not just a book — it’s a decade's worth of bugs

Code that seems to work isn’t code that is guaranteed to work. It took me years to learn to think critically about my code and make it hold up in the wild.

This book is the result: 25 real C++ bugs that humbled me, and what they taught me.

The Book

A beautiful PDF containing 25 real life C++ bugs and their solutions

This book covers a lot of different bugs. All cases have a complete breakdown to make sure you understand the bug. Most even come with a doctors note, so you know how to avoid them.

Every chapter is designed to be as independent as possible, so you can read them in almost any order. Some bugs you will recognise immediately depending on your expertise, but I dare to bet you don't know half of them.

One reader said: "good bug puzzles" and that's exactly what it is. This book is designed to train your brain with real c++ bugs to make you a better C++ developer, while having fun.

Every case can directly be compiled and run within you web browser so you can examin the behavior of the program for yourself.

All the cases

This book shows how easily the wrong consequences can stay hidden, and helps develop the right way of thinking. Short examples, a calm layout, and clear explanations of the why and the fix.

Bart van H

Case 01 The Eternal Button

Ready To Be Humbled?

This is the most valuable piece of text I have ever read as a CS major. It has taught me a lot more about C++ than I have learned in my university in the last 3 semesters. Totally recommended.

Muhammad T.

Good bug puzzles; some of them I had to look at a bit longer. It shows how easily the wrong consequences can stay hidden, and helps develop the right way of thinking. Short examples, a calm layout, and clear explanations of the why and the fix.

Bart van H.

I have been working with C++ for many years, but the cases in this book taught me a bunch of things I never knew about the nooks and crannies of the language. Pair this book with your favorite compiler and explore them for yourself.

Brendan L.

The core concepts are often straightforward, but their specific expression introduces subtleties, which this book does an incredible job bringing out. The layout is highly practical, with code syntax that blends perfectly into the text, and direct Compiler Explorer links that eliminate all friction to testing the examples.

Ankur A.

The Face Behind The Doctor

Jelle has been a C++ engineer for over a decade, contributing to a wide range of commercial products, primarily in the area of audio and music software such as audio plugins or desktop applications. He’s driven by a passion for writing high-quality code, and when he realized how many developers struggle to write good C++ code he founded C++ Doctor. Aiming to help others write clean, bug-free C++ through educational content delivered via newsletters, LinkedIn, eBooks and other products. C++ Doctor also provides C++ code reviewing and consultancy on request.

You Don't Know C++ ..

or do you?

"This book walks you through some pitfalls and C++ caveats you usually only learn by getting bitten in production. It's insightful and entertaining and will help me write more secure code. A must read!" - Salem B.

Learn how to write an EventDispatcher


Learn how to write an RAII based Timer


Learn how to use std::visit


Free Bonus:

All code examples from the book are available on GitHub for you to run and experiment with

"You went down to the smallest details and "put on the tray" many use cases. A very useful book which I recommend with pleasure."

Cureliuc Romeo, Senior Software Developer (10+ years)

What You'll Learn

Lambdas under the hood


Lambda syntax


Lambdas as arguments


Lambda defined

Lambda captures


Lambdas in practice


Lambda performance and memory implications


Lambda and std::function

and much more ...

Looking for answers?

A complete guide to C++ lambdas from basics to advanced use. It's over 40 pages full of valuable content AND you'll receive a free bonus, ALL code examples from the book are available on GitHub for you to run and experiment with.

You will receive a download link to the PDF in your e-mail directly after purchasing.

Currently the ebook only costs $14,99 (excl. tax depending on your country). This will most likely go up in the future.

"Read it if you are unfamiliar with lambdas and want to know what all the possibilities are. It very clear and easy to follow."

Roel Vugts, Audio Developer (1-3 years)

Join our newsletter

Sign up to stay up to date with C++ best practices and news and receive 20% off The Anatomy of C++ Lambas eBook