1 / 11
Learn modern C++ from zero and build a tested, sanitized, networked service: types, classes, RAII, smart pointers, move semantics, the standard library, ranges, std::expected, templates, concepts, constexpr, GoogleTest, threads, coroutines, Asio, performance, sanitizers, vcpkg, CMake presets, and…
A Complete, Practical Guide to C++20 and C++23
Read before you buy: the PDF here is a free sample — the first 20 pages of the 516-page book (payments, sales and reviews on this demo site are sample data). Get the full e-book at thenexbooks on Gumroad.
Learn C++ the modern way, from your first program to a production network service.
C++ runs inside browsers, databases, game engines, trading systems, cars, and compilers. When software has to be fast, predictable, and maintained for decades, C++ is very often the language underneath. It also has a reputation for being huge and full of sharp edges. Much of that comes from old habits. Modern C++ has automatic resource management, smart pointers, a rich standard library, ranges, concepts, safe formatting, and tools that catch whole classes of bugs before your users do.
This book teaches C++ the modern way from the very first chapter, so you never learn old habits only to unlearn them later. You build one real application step by step, and each new idea appears at the moment it solves a problem you actually have.
What's inside
- What C++ is good at, the standards from C++98 to C++23, and setting up GCC, Clang, or MSVC with CMake and Ninja on Windows, macOS, or Linux
- How source code becomes a program: preprocessing, compiling, linking, reading compiler and linker errors, and your first CMakeLists.txt
- Fundamentals: types, conversions, strings and string_view, std::format and std::print, console I/O, control flow, and functions
- Classes and invariants, object lifetime, references and pointers, RAII, unique_ptr and shared_ptr, and the rule of zero
- Copy and move semantics, value semantics, inheritance and virtual functions, and std::variant as an alternative
- Containers (vector, array, map, unordered_map, span), algorithms, iterators, lambdas, and C++20 ranges and views
- Error handling with exceptions, std::optional, and C++23 std::expected; files, std::filesystem, binary formats, and chrono
- Templates, concepts and constraints, constexpr and consteval, headers, libraries, modules, and testing with GoogleTest
- Threads, mutexes, atomics, the memory model, jthread, thread pools, and coroutines
- A real TCP and HTTP gateway with Asio and cpp-httplib, and performance work with profilers and cache-friendly data
- Undefined behavior, AddressSanitizer, UBSan, TSan, clang-tidy, vcpkg and Conan, CMake presets, spdlog logging, CI, and packaging
One running example, start to finish. You build the software for Ferrowind, a fictional wind-farm operator with 24 turbines on three sites. A small command-line tool that summarizes a CSV file grows into a multithreaded network gateway that receives live turbine readings over TCP and serves summaries and alerts over HTTP. By the end it is tested, sanitized, and packaged.
Current and honest. C++20 is the baseline, and C++23 features are labeled wherever they are used. The book notes where compiler support still varies, and it contains no invented benchmarks. Every chapter includes complete code, Tips, Notes, Warnings, exercises, and Key Takeaways.
Format: PDF, 516 pages (A4), linked table of contents and bookmarks. English. First Edition, 2026. Published by thenexbooks. This book is independent and is not affiliated with or endorsed by the ISO C++ committee, the Standard C++ Foundation, or any compiler or library vendor.
Table of Contents
Part I — Getting Started
- Ch 1 · Why C++? The Language, Compilers, and Your Setup
- Ch 2 · Your First Programs: Compiling, Linking, and Building with CMake
- Ch 3 · Types, Variables, and Operators
- Ch 4 · Strings, Formatting, and Console Input and Output
- Ch 5 · Control Flow and Functions
Part II — Objects and Resources
- Ch 6 · Classes, Constructors, and Encapsulation
- Ch 7 · Memory, Pointers, References, and Object Lifetime
- Ch 8 · RAII and Smart Pointers
- Ch 9 · Copy, Move, and Value Semantics
- Ch 10 · Inheritance, Polymorphism, and Its Alternatives
Part III — The Standard Library
- Ch 11 · Containers: vector, array, map, unordered_map, and span
- Ch 12 · Algorithms, Iterators, and Lambdas
- Ch 13 · Ranges and Views
- Ch 14 · Error Handling: Exceptions, std::optional, and std::expected
- Ch 15 · Files, Streams, the Filesystem Library, and Time with chrono
Part IV — Generic and Modern C++
- Ch 16 · Templates and Generic Programming
- Ch 17 · Concepts and Constraints
- Ch 18 · constexpr and Compile-Time Programming
- Ch 19 · Code Organization: Headers, Namespaces, Libraries, and Modules
- Ch 20 · Testing C++ with GoogleTest
Part V — Concurrency and Systems Programming
- Ch 21 · Threads, Mutexes, Atomics, and the Memory Model
- Ch 22 · Asynchronous Work: Futures, jthread, Thread Pools, and Coroutines
- Ch 23 · Networking: Building the Ferrowind Gateway with Asio and HTTP
- Ch 24 · Performance: Measuring, Cache-Friendly Data, and Allocations
Part VI — Production C++
- Ch 25 · Undefined Behavior, Sanitizers, and Static Analysis
- Ch 26 · Dependencies and Builds: vcpkg, Conan, CMake Presets, and Cross-Platform Projects
- Ch 27 · Logging, Configuration, CI, and Shipping
- Ch 28 · Case Study: Ferrowind from Prototype to Production
Appendices
A · Modern C++ Cheat Sheet
B · Templates and Reference
C · Production Checklist
D · Glossary
Book details
| Detail | |
|---|---|
| Pages | 516 |
| Format | PDF (A4) |
| Language | English |
| Level | Beginner to Intermediate |
| Edition | 1st Edition (2026) |
| Download on this site | Free sample, first 20 pages (PDF) |
| Publisher | thenexbooks |
Files you get
No reviews yet. Only buyers can review.
More from thenexbooks