You know how to code, but you're ready to level up. You've heard about the power and performance of C++, a language vital to fields like AI, game development, and high-performance computing. But where do you even start? Existing resources are outdated or overly academic, or they assume a deep understanding of C. You need a guide that respects your existing skills and gets you coding fast with modern C++.
This book cuts through the noise, focusing on the essential elements of C++ with hands-on projects that quickly build your skills and confidence. Author and C++ expert Frances Buontempo gets you up to speed quickly with the latest features and best practices of the language, preparing you for more advanced exploration.
- Write clean and efficient C++ code
- Understand core concepts and syntax
- Apply various programming approaches, from OOP to functional styles
- Read and understand complex C++ definitions and resources
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A practical, hands-on introduction to modern C++ (C++23) for programmers who already know how to code but are new to the language—covering everything from basic syntax and input handling to classes, variants, and templates through a fun trading-game project.
【Book Arc】
- **Opening (~0%–13%)**: Sets up the book's philosophy—you don't need to learn C first—and walks through installing tools, choosing an editor, and writing your first "Hello, World!" program. Covers fundamental syntax: functions, statements, the `main` function, and basic types.
- **Early (~13%–32%)**: Dives into variables and keyboard input, teaching stream handling with `std::cin`, error detection using `eof` and `peek`, and function design. Introduces testing with `assert`, pass-by-reference vs. pass-by-value, and the importance of C++'s strong typing.
- **Middle (~32%–48%)**: Explores error handling in depth—exceptions vs. `std::expected`—and introduces loops for handling multiple inputs. Moves into containers, focusing on `std::vector` with iterators, insertion, erasure, and capacity management.
- **Middle (~48%–65%)**: Covers strings (both C-style and C++ `std::string`), file I/O as streams, and the transition into object-oriented programming with classes. Establishes the trading-game project as a recurring hands-on exercise.
- **Late (~65%–85%)**: Delves into classes in detail: virtual functions, inheritance, abstract base classes, and derived types. Addresses advanced topics like virtual destructors and object slicing, then introduces `std::variant` and `std::visit` as modern alternatives to traditional OOP patterns.
- **Ending (~85%–100%)**: Wraps up with templates and lookup tables (`std::unordered_map`), providing a brief but sufficient introduction to writing your own templates. Concludes by acknowledging there's more to learn while affirming the reader now has a solid foundation.
【Key Takeaways】
- **Modern C++ is accessible without prior C knowledge** (Opening): The book explicitly debunks the myth that you must learn C first, making C++ approachable for programmers from other languages. (Early)
- **Streams are the backbone of I/O** (Early): Understanding `std::cin`, `std::cout`, and manipulators like `std::endl` (which flushes the buffer) helps you handle input/output robustly and debug effectively. (Early)
- **Strong typing is your friend** (Early): C++'s type system catches errors at compile time—like passing an `int` where a `double&` is expected—saving you from runtime surprises. (Early)
- **Error handling has modern options** (Middle): Beyond traditional exceptions, `std::expected` lets you return either a value or an error message, giving you explicit control over failure cases without throwing. (Middle)
- **Containers manage memory for you** (Middle): `std::vector` handles dynamic resizing automatically, and functions like `insert`, `erase`, and `shrink_to_fit` give you fine-grained control over data and capacity. (Middle)
- **Classes enable multiple paradigms** (Late): C++ supports OOP but doesn't force it—you can write object-oriented, functional, or procedural code, and the book shows how to choose what fits your design. (Late)
- **Modern alternatives to classic OOP** (Late): `std::variant` with `std::visit` offers a type-safe way to handle a fixed set of types, often cleaner than deep inheritance hierarchies. (Late)
- **Templates are powerful but approachable** (Ending): A short introduction is enough to understand how to write your own templates, opening the door to generic programming. (Ending)
【Reading Tips】
- **Type the code as you read**: The book explicitly encourages this—hands-on practice with the trading-game project is essential for retention and understanding.
- **Skim the tool-installation sections if you're experienced**: If you already have a C++ toolchain or prefer an IDE, you can jump ahead to the syntax chapters without missing core content.
- **Deep-read the error-handling chapters**: The distinction between exceptions and `std::expected` is subtle but crucial for writing robust code—pay close attention to the trade-offs.
- **Use Compiler Explorer (Godbolt) for quick experiments**: The book recommends this online tool for testing snippets without local setup, which is great for trying variations on examples.
- **Don't skip the "In Depth" sections**: These provide the "why" behind the "how," especially for virtual functions, slicing, and `std::variant`—they'll save you from common pitfalls later.
【Coverage Limits】
This guide synthesizes the opening through middle sections (roughly 0–52% of the book). The later chapters on classes, variants, and templates are summarized from the table of contents and brief excerpts; detailed content on those topics is not fully covered here.
Excerpt 1
254 Defining an Abstract Base Class 254 A Derived Class 255 Using Derived Classes 258 A New Trading Game 261 Adding Another Derived Type 264 Virtual Function...
with the GNU Compiler Collection (GCC). GCC can build sev‐ eral languages and provides a tool called g++ to build C++ code. See if you have g++ by opening a...
le trying to match the argument list '(std::istream, int)' The compiler sees a function that expects a reference to a double, so it complains when you send i...
x, first, and then x is incremented. So, x is 1 and y is 0. There are a few cases where using preincrement rather than postincrement makes a difference, but...
emove the elements. You therefore see an assertion failure: Assertion 'got.size() == 1' failed. Let’s make the test pass. You will use std::remove_if. The ca...
the <ios> header before you stream out the bool, like this: std::cout << "Required profit possible " << std::boolalpha << possible << '\n'; boolalpha is a ma...
ace for the count you need and then put the prices in using another algorithm called std::generate_n. Like std::generate, this algorithm takes a function to...
"How are you?" for(auto message: messages) { std::cout << message << '\n'; } If you try this, you will see both messages print. Avoid using it in your code,...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Introducing C++ The Easy Way to Start Learning Modern C++ (Frances Buontempo)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Introducing C++ The Easy Way to Start Learning Modern C++ (Frances Buontempo)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment