Skip to content

Last updated:2026-10-12

Project Overview

1. Introduction

C++那些事 is an open-source learning project aimed at both C++ beginners and intermediate developers. It is designed to help learners progress from the basics of C++ to advanced topics, covering everything from syntax fundamentals, object-oriented programming, template programming, and STL usage to multithreading and concurrency, memory management, and performance optimization. In addition, the project takes a deep dive into the source code of several classic open-source libraries and frameworks, helping developers better understand how C++ is applied in real-world projects.

2. Goals

  • From beginner to advanced: provides beginners with a systematic learning path that takes them step by step from zero to mastering the core concepts and advanced features of C++.
  • Interview preparation: offers analysis and hands-on practice for common C++ interview questions, helping candidates stand out in interviews.
  • Source code analysis: by analyzing the source code of classic open-source projects, it helps developers gain a deep understanding of C++ design patterns and implementation principles.
  • Multithreading and concurrency: takes an in-depth look at multithreaded programming and concurrency control in C++, helping developers write efficient, safe concurrent programs.
  • Performance optimization: introduces performance optimization techniques in C++, helping developers write efficient code.

3. Content

The C++那些事 project is rich in content and covers every aspect of C++, organized into the following major modules:

  • Fundamentals to Advanced

    • Keywords and features: detailed explanations of keywords such as const, static, this, inline, sizeof, virtual, volatile, explicit, friend, using, ::, enum, and decltype.
    • Functions and pointers: function pointers, pure virtual functions and abstract classes, vptr_vtable, and more.
    • Data structures: struct, union, bit fields, the difference between references and pointers, and more.
    • Implementing C++ polymorphism in C: implementing the polymorphism features of C++ in the C language.
    • Macros and assertions: defining and using macros, and typical use cases for assert.
  • Hands-on series

    • 10-day crash practice: rapidly level up your C++ programming skills through ten days of intensive exercises.
    • Key hands-on exercises: targeted practice on the key and difficult points of C++ to consolidate what you have learned.
  • STL source code analysis

    • Containers: source code analysis of containers such as array, deque, queue, stack, list, vector, rb_tree, set, multiset, map, multimap, hashtable, and unordered_map.
    • Iterators and traits: iterator, traits, typename, and more.
    • EBO optimization: the Empty Base Optimization (EBO) technique used in STL design.
  • C++2.0 new features

    • C++11 features: automatic type deduction, lambda expressions, rvalue references, smart pointers, and more; see also the C++11 topic on this site.
    • C++17 / C++20: the C++17 topic and the C++20 topic.
  • Extended topics

    • Deep dives into language mechanisms: mutable, the whole const family, ABI, tail recursion, and more (see the navigation item "Fundamentals to Advanced → Deep dives into language mechanisms").
    • Memory and debugging, benchmarks, hands-on projects, reading and tips: standalone navigation sections with practical articles on AddressSanitizer, Benchmark, pybind11, gRPC, and more.
  • Design patterns

    • Common design patterns: how classic patterns such as Singleton, Factory, and Observer are applied in C++.
  • Concurrent programming

    • Multithreading and multiprocessing: multithreaded programming techniques such as std::thread, std::async, std::mutex, and std::condition_variable.
    • C++ Concurrency in Action: an in-depth exploration of concurrency models and practice in C++.
  • C++ idioms

    • Programming style and idioms: explores common C++ programming styles and idioms, helping developers write more elegant code.
  • Courses

    • GeekTime's "Modern C++ in Practice: 30 Lectures": a recommended learning resource for systematically studying modern C++.
  • Tools

    • Debugging and printing tools: how to use debugging tools such as dbg-macro and rr.
    • Container printing helpers: tools that make printing containers more convenient.
    • Watching the compiler at work: observing how C++ code changes through the compilation process with the help of tools.

4. Highlights

  • Systematic learning path: content progresses step by step from fundamentals to advanced topics, suitable for learners at different levels.
  • Theory combined with practice: in addition to theoretical explanations, there is an abundance of code examples and hands-on projects.
  • In-depth source code analysis: by analyzing the source code of classic open-source projects, it helps developers deeply understand the design and implementation of C++.
  • Multithreading and concurrency: an in-depth discussion of concurrent programming in C++, helping developers write efficient, safe concurrent programs.
  • Interview oriented: provides analysis of common interview questions, helping candidates prepare better for interviews.

5. Resources

  • Online learning site: C++那些事
  • WeChat official account: 光城
  • Bilibili videos: 未来的光城 — the project's content is also published on Bilibili in video form, making it convenient for learners to watch.

6. How to Contribute

C++那些事 is an open-source project, and contributions from developers are more than welcome. You can get involved in the following ways:

  • Star and Fork: if you find the project helpful, you are welcome to Star and Fork it on GitHub.
  • Submit PRs: if you have great content or suggestions for improvement, feel free to submit a Pull Request.
  • Feedback and suggestions: if you run into problems while using the project or have any suggestions, please raise them in the project's Issue section.

7. Roadmap

  • More advanced topics: such as C++20 features, metaprogramming, and compile-time computation.
  • More hands-on projects: more hands-on projects to help developers apply what they have learned in real-world development.
  • Community building: building a more active community and encouraging developers to exchange ideas and share.

8. Final Words

C++那些事 is an open-source project dedicated to helping C++ learners go from beginner to advanced. Whether you are a beginner or a developer with some experience, you can find learning resources that suit you here. We hope that through this project, more people will master C++ and use it with confidence in real-world development.

Everyone is welcome to Star, Fork, and send PRs to jointly push the C++ community forward!

9. About the Author

  • WeChat: search for gcxzhang

  • WeChat official account

Project Overview
Knowledge Planet
wechat
WeChat Official Account
  • Show your support
alipay
Alipay
wechat
WeChat

Comments