From 6dafc3f1c26e7817acff06e9801b46e1c2b2ced3 Mon Sep 17 00:00:00 2001 From: light-city <455954986@qq.com> Date: Sat, 16 May 2026 12:26:05 +0800 Subject: [PATCH] fix: readme sync. --- README.md | 48 ++++-- README_EN.md | 461 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 320 insertions(+), 189 deletions(-) diff --git a/README.md b/README.md index 2ae321d..bbb3f7f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,36 @@ +
+ +# C++ 那些事 + +

+ 🇨🇳 中文 | + 🇺🇸 English +

+ +

+ + GitHub Stars + + + GitHub Forks + + + GitHub Issues + + + License + +

+ +

+ C++ 那些事 | 从入门到进阶的 C++ 学习之旅 | 深入理解现代 C++ +

+ +
+ +--- + - [C++ 那些事](#c-那些事) - [重磅项目](#重磅项目) - [关于作者](#关于作者) @@ -50,6 +82,10 @@ 这是一个适合初学者从**入门到进阶**的仓库,解决了**面试者与学习者**想要**深入 C++** 及如何**入坑 C++** 的问题。除此之外,本仓库拓展了更加深入的源码分析,多线程并发等的知识,是一个比较全面的 C++ 学习从入门到进阶提升的仓库。 +> 🎯 **适合人群**: C++ 初学者、面试准备者、想系统学习 Modern C++ 的开发者 +> 📚 **涵盖内容**: C++11/14/17/20 新特性、STL 源码剖析、设计模式、并发编程 +> 🔧 **实践导向**: 配套完整代码示例和实战项目 + ### 重磅项目 @@ -421,17 +457,5 @@ map mp{ - [C++ 中如何将 string 类型转换为 int 类型?](./extension/some_problem/string_int.md) -### 贡献者 - - - -| 贡献人 | 地址 | -| ------- | ----------------------------- | -| 光城 | https://github.com/Light-City | -| ChungZH | https://github.com/ChungZH | -| xliu79 | https://github.com/xliu79 | - - - diff --git a/README_EN.md b/README_EN.md index 787e5c2..c150e26 100644 --- a/README_EN.md +++ b/README_EN.md @@ -1,141 +1,272 @@ +
+ # Stories About C Plus Plus -Thanks for all the support about << Stories About C ++ >>~~, right now you could open this link(https://light-city.club/sc/) to read this article.~~ -Any star, retweet or pr will be welcomed. +

+ 🇨🇳 中文 | + 🇺🇸 English +

-**Notice: The website is not available now.** +

+ + GitHub Stars + + + GitHub Forks + + + GitHub Issues + + + License + +

+ +

+ Stories About C++ | Your Journey from Beginner to Advanced | Deep Dive into Modern C++ +

+ +
+ +--- + +- [Stories About C++](#stories-about-c++) + - [Featured Projects](#featured-projects) + - [About the Author](#about-the-author) + - [Project Setup](#project-setup) + - [Method 1: VSCode + Bazel](#method-1-vscode--bazel) + - [Method 2: Docker](#method-2-docker) + - [Method 3: g++](#method-3-g) + - [Video Tutorials](#video-tutorials) + - [Feishu Knowledge Base](#feishu-knowledge-base) + - [Foundation](#foundation) + - [Practical Exercises](#practical-exercises) + - [10-Day Practice](#10-day-practice) + - [Key Exercises](#key-exercises) + - [C++2.0 New Features](#c20-new-features) + - [Overview](#overview) + - [C++11 New Features](#c11-new-features) + - [C++14/17/20](#c141720) + - [Design Patterns](#design-patterns) + - [STL Source Code Analysis](#stl-source-code-analysis) + - [Concurrency Programming](#concurrency-programming) + - [C++ Concurrency in Action](#c-concurrency-in-action) + - [Multithreading and Multiprocess](#multithreading-and-multiprocess) + - [Threading In C++](#threading-in-c) + - [C++ Idioms](#c-idioms) + - [What's your favorite C++ programming idiom?](#whats-your-favorite-c-programming-idiom) + - [Learning Courses](#learning-courses) + - [GeekTime "Modern C++ in Action 30 Lessons"](#geektime-modern-c-in-action-30-lessons) + - [Tools](#tools) + - [Container Quick Output Tool](#container-quick-output-tool) + - [Output Like Python (Jupyter Notebook)](#output-like-python-jupyter-notebook) + - [Observe Compilation Process](#observe-compilation-process) + - [C++ Debug Tool dbg-macro](#c-debug-tool-dbg-macro) + - [Linux Debug Tool rr - Ability to Go Back in Time](#linux-debug-tool-rr---ability-to-go-back-in-time) + - [Extensions](#extensions) + - [Some Questions](#some-questions) + +# Stories About C++ + +Thank you for your support of *Stories About C++*. The content is also available on Bilibili in video format for easier learning. Welcome to star, share, and submit PRs. + +Online Personal Blog: [Light City Lab](https://light-city.github.io/) + +Online Learning Site: [Stories About C++](https://light-city.github.io/stories_things/) + +- Chinese Name: **C++ 那些事** +- English Name: **Stories About C Plus Plus** + +This repository is designed for beginners to advance from **entry level to mastery**. It addresses the needs of **interviewees and learners** who want to **deeply understand C++** and **get started with C++**. Beyond the fundamentals, this repository also covers more advanced topics such as in-depth source code analysis and multi-threaded concurrency. It is a comprehensive C++ learning resource, from beginner to advanced improvement. + +> 🎯 **Target Audience**: C++ beginners, interview candidates, developers wanting to systematically learn Modern C++ +> 📚 **Content Covered**: C++11/14/17/20 new features, STL source code analysis, design patterns, concurrency programming +> 🔧 **Practice-Oriented**: Complete code examples and practical projects included ------------------------ +### Featured Projects + +A series of featured projects have been launched to guide you through practical C++ learning. Combined with this open-source project, you'll grow rapidly! + +Direct Link: [Click Here](./proj/README.md) + +### About the Author + +The WeChat Official Account has opened two major entry points: albums and menus. You can directly read *Stories About C++* content on WeChat, paired with the code in this repository for an excellent experience. We recommend following us. + +Personal WeChat Official Account: guangcity + +Or scan the QR code below. We welcome your feedback and C++ discussions. I have created a C++ Stories exchange group on WeChat, a high-quality C++ resource exchange area. Please follow the above official account, click the bottom right corner → Contact Me, and I'll add you to the group. + +--- + +> Follow Me + +If you find this helpful, follow me~ + + + + + + + + +
+
+ Planet +
+
+ WeChat Official Account +
-### 0. Directory +### Project Setup -- Chinese version:**C++ 那些事** -- English version:**Stories About C Plus Plus** -This repository meets the need of people who wants to really know about C++, and may help you in the interview. Besides, it also provides -other details,such as in-depth source code analysis and multi-threaded concurrency. It is a comprehensive C ++ repository from entry to advanced improvement +#### Method 1: VSCode + Bazel -### 1.Foundation +#### Method 2: Docker -- [Stories About const](./basic_content/const) -- [Stories About static](./basic_content/static) -- [Stories about this](./basic_content/this) -- [Stories About inline](./basic_content/inline) -- [Stories About sizeof](./basic_content/sizeof) -- [Stories About pointer of function](./basic_content/func_pointer) -- [Stories About pure virtual function and abstract](./basic_content/abstract) -- [Stories About vptr_vtable](./basic_content/vptr_vtable) -- [Stories About virtual](./basic_content/virtual) -- [Stories About volatile](./basic_content/volatile) -- [Stories About assert](./basic_content/assert) -- [Stories About bit](./basic_content/bit) -- [Stories About extern](./basic_content/extern) -- [Stories About struct](./basic_content/struct) -- [Stories About struct and class](./basic_content/struct_class) -- [Stories About union](./basic_content/union) -- [Stories About polymorphism](./basic_content/c_poly) -- [Stories About explicit](./basic_content/explicit) -- [Stories About friend](./basic_content/friend) -- [Stories About using](./basic_content/using) -- [Stories About :: ](./basic_content/maohao) -- [Stories About enum](./basic_content/enum) -- [Stories About decltype](./basic_content/decltype) -- [Stories About pointer_refer](./basic_content/pointer_refer) -- [Stories About macro](./basic_content/macro) +A Docker environment without development setup is now available. You can pull the following image: -### 2.Code Samples +``` +docker pull xingfranics/cplusplusthings:latest +``` +#### Method 3: g++ -#### 2.1 10 Days Practice -- [x] day1 +### Video Tutorials -Basic Grammar About C ++ -- [x] day2 +[Episode 1: Step By Step Compiling This Project](https://www.bilibili.com/video/BV1Rv4y1H7LB/?vd_source=bb6532dcd5b1d6b26125da900adb618e) -Recursive、Struct、Enumerate、Static Variable +[Episode 2: Docker Environment Without Setup](https://www.bilibili.com/video/BV1oz4y1a7Pu/?vd_source=bb6532dcd5b1d6b26125da900adb618e) -- [x] day3 +[Episode 3: Reading HashTable Together, Thoroughly Understanding C++ STL](https://www.bilibili.com/video/BV1o8411U7vy/?vd_source=bb6532dcd5b1d6b26125da900adb618e) -Function +[Episode 4: Reading STL enable_shared_from_this Together](https://www.bilibili.com/video/BV1du4y1w7Mg/?spm_id_from=333.788&vd_source=bb6532dcd5b1d6b26125da900adb618e) -- [x] day4 +[Episode 5: Reading STL Threads Together, From C++11 thread to C++20 jthread](https://www.bilibili.com/video/BV1DH4y1g7gS/?vd_source=bb6532dcd5b1d6b26125da900adb618e) -Thorough About Function +[Episode 6: Reading STL condition_variable, condition_variable_any Together](https://www.bilibili.com/video/BV13b421b7Am/?spm_id_from=333.999.0.0&vd_source=bb6532dcd5b1d6b26125da900adb618e) -- [x] day5 +[Episode 7: Reading STL Mutex Together](https://www.bilibili.com/video/BV1xm42157pq/?spm_id_from=333.999.0.0&vd_source=bb6532dcd5b1d6b26125da900adb618e) -Inheritance and Polymorphism +[Episode 8: Reading STL RAII Lock Together](https://www.bilibili.com/video/BV1Ls421g7iq/?spm_id_from=333.788&vd_source=bb6532dcd5b1d6b26125da900adb618e) -- [x] day6 +### Feishu Knowledge Base -Virtual Function、Abstruct +[Internet Big Company Interview Records](https://hmpy6adnp5.feishu.cn/docx/OitBdRB4KozIhTxQt7Ec7iFDnkc) -- [x] day7 +[Essential Interview Guide for Landing Offers](https://hmpy6adnp5.feishu.cn/docx/B1aCdVTUgoyJGYxtWV7cdvgRnxv) -Operator overloading -- [x] day8 +### Foundation -Template And STL +- [Stories About `const`](./basic_content/const) +- [Stories About `static`](./basic_content/static) +- [Stories About `this`](./basic_content/this) +- [Stories About `inline`](./basic_content/inline) +- [Stories About `sizeof`](./basic_content/sizeof) +- [Stories About Function Pointers](./basic_content/func_pointer) +- [Stories About Pure Virtual Functions and Abstract Classes](./basic_content/abstract) +- [Stories About `vptr_vtable`](./basic_content/vptr_vtable) +- [Stories About `virtual`](./basic_content/virtual) +- [Stories About `volatile`](./basic_content/volatile) +- [Stories About `assert`](./basic_content/assert) +- [Stories About Bit Fields](./basic_content/bit) +- [Stories About `extern`](./basic_content/extern) +- [Stories About `struct`](./basic_content/struct) +- [Stories About `struct` and `class`](./basic_content/struct_class) +- [Stories About `union`](./basic_content/union) +- [Stories About Implementing C++ Polymorphism in C](./basic_content/c_poly) +- [Stories About `explicit`](./basic_content/explicit) +- [Stories About `friend`](./basic_content/friend) +- [Stories About `using`](./basic_content/using) +- [Stories About `::`](./basic_content/maohao) +- [Stories About `enum`](./basic_content/enum) +- [Stories About `decltype`](./basic_content/decltype) +- [Stories About References and Pointers](./basic_content/pointer_refer) +- [Stories About Macros](./basic_content/macro) -- [x] day9 +### Practical Exercises -Exception +#### [10-Day Practice](./practical_exercises/10_day_practice) -- [x] day10 +- [day1 - Basic Syntax](practical_exercises/10_day_practice/day1) -File And Stream +- [day2 - Recursion, Struct, Enum, Static Variables, etc.](practical_exercises/10_day_practice/day2) -#### 2.2 Practical Exercises +- [day3 - Functions 1](practical_exercises/10_day_practice/day3) -├── [Square brackets overload .cpp](./practical_exercises/key_exercises/中括号重载.cpp) -├── [Clock++operator overloading.cpp](./practical_exercises/key_exercises/时钟++运算符重载.cpp) -├── [Mandatory conversion of operator overloading.cpp](./practical_exercises/key_exercises/运算符重载之强制转换.cpp) -└── [Clock with overloaded parenthesis.cpp](./practical_exercises/key_exercises/重载圆括号的时钟.cpp) +- [day4 - Functions 2](practical_exercises/10_day_practice/day4) -├── [Template of Function.cpp](./practical_exercises/key_exercises/函数模板.cpp) +- [day5 - Inheritance and Polymorphism](practical_exercises/10_day_practice/day5) -├── [Dynamic array.cpp](./practical_exercises/key_exercises/动态数组.cpp) +- [day6 - Virtual Functions and Abstract Classes](practical_exercises/10_day_practice/day6) -├── [Dictionary insertion and search.cpp](./practical_exercises/key_exercises/字典插入与查找.cpp) +- [day7 - Operator Overloading](practical_exercises/10_day_practice/day7) -├── [Catch Exception.cpp](./practical_exercises/key_exercises/异常捕获.cpp) +- [day8 - Templates and STL](practical_exercises/10_day_practice/day8) -├── [Template of Stack.cpp](./practical_exercises/key_exercises/类模板之栈.cpp) +- [day9 - Exceptions](practical_exercises/10_day_practice/day9) -├── [Template of Array.cpp](./practical_exercises/key_exercises/类模板特化之数组.cpp) +- [day10 - Files and Streams](practical_exercises/10_day_practice/day10) -├── [Inheritance And Package.cpp](./practical_exercises/key_exercises/继承与封装.cpp) +#### [Key Exercises](./practical_exercises/key_exercises/) -├── [Read And Write files.cpp](./practical_exercises/key_exercises/读写文件综合题.cpp) -├── [Operator Overloading About Input and Output.cpp](./practical_exercises/key_exercises/输入输出运算符重载.cpp) -├── [Input And Output Overloading.cpp](./practical_exercises/key_exercises/输入输出重载.cpp) -├── [Input Format.cpp](./practical_exercises/key_exercises/输出格式.cpp) +- [Bracket Overloading.cpp](./practical_exercises/key_exercises/bracket_overloading.cpp) -### 2.[C++2.0 New Features](./cpp2.0) +- [Clock++ Operator Overloading.cpp](./practical_exercises/key_exercises/clock.cpp) -#### 2.0 Overview +- [Operator Overloading - Type Casting.cpp](./practical_exercises/key_exercises/operator_cast.cpp) -C++2.0 is an Abbreviation, meaning「modern C++」,including C++11/14/17/20. +- [Clock with Parentheses Overloading.cpp](./practical_exercises/key_exercises/operator_circle.cpp) -#### 2.1 [C++11 New Features](./cpp2.0/cpp11) +- [Function Template.cpp](./practical_exercises/key_exercises/func_temp.cpp) + +- [Dynamic Array.cpp](./practical_exercises/key_exercises/array.cpp) + +- [Dictionary Insertion and Lookup.cpp](./practical_exercises/key_exercises/map_insert_look.cpp) + +- [Exception Catching.cpp](./practical_exercises/key_exercises/try.cpp) + +- [Class Template - Stack.cpp](./practical_exercises/key_exercises/stack.cpp) + +- [Class Template Specialization - Array.cpp](./practical_exercises/key_exercises/array_template.cpp) + +- [Inheritance and Encapsulation.cpp](./practical_exercises/key_exercises/override.cpp) + +- [File Read and Write Comprehensive Exercise.cpp](./practical_exercises/key_exercises/read_file.cpp) + +- [Input/Output Operator Overloading.cpp](./practical_exercises/key_exercises/io_operator_overload.cpp) + +- [Input/Output Overloading.cpp](./practical_exercises/key_exercises/io_operator.cpp) + +- [Output Format.cpp](./practical_exercises/key_exercises/output.cpp) + + +### [C++2.0 New Features](./cpp2.0) + +#### Overview + +C++2.0 is a shorthand for "Modern C++", including C++11/14/17/20. + +#### [C++11 New Features](./cpp2.0/cpp11) - [Variadic Templates](./cpp2.0/cpp11/variadic) - Spaces in Template Expressions ```cpp - vector > //ok in each C++ version - vector> // before c++ 11 error error: ‘>>’ should be ‘> >’ within a nested template argument list,version beyond c++ 11 could compile successfully + vector > // ok in each C++ version + vector> // before C++11 error: '>>' should be '> >' within a nested template argument list, compiles normally from C++11 onwards ``` - [nullptr and nullptr_t](./cpp2.0/cpp11/nullptr.cpp) - [Automatic Type Deduction with auto](./cpp2.0/cpp11/auto.cpp) -- [Uniform Initialization ](./cpp2.0/cpp11/uniform_initialization.cpp) +- [Uniform Initialization](./cpp2.0/cpp11/uniform_initialization.cpp) - [initializer_list](./cpp2.0/cpp11/initializer.cpp) @@ -149,14 +280,14 @@ C++2.0 is an Abbreviation, meaning「modern C++」,including C++11/14/17/20. } ``` -- [=default,=delete](./cpp2.0/cpp11/default_delete.cpp) +- [=default, =delete](./cpp2.0/cpp11/default_delete.cpp) - If you define a ctor by yourself, compiler won't compile the default ctor. - If you add =default, you could recatch and use default ctor. + If you define a `ctor` yourself, the compiler won't provide a `default ctor`. + If you force add `=default`, you can regain and use the `default ctor`. -- Alias(化名)Template(template typedef) +- Alias (化名) Template (template typedef) - - [alias.cpp](./cpp2.0/cpp11/alias.cpp) + - [alias.cpp](./cpp2.0/cpp11/alias.cpp) - [template_template.cpp](./cpp2.0/cpp11/template_template.cpp) - [template template parameter](./cpp2.0/cpp11/template_template.cpp) @@ -177,29 +308,30 @@ C++2.0 is an Abbreviation, meaning「modern C++」,including C++11/14/17/20. - [move aware class](./cpp2.0/cpp11/move.cpp) -- Container-Struct And Classify +- Container Structure and Classification - - (1) Serial containers include:`array`(C++2.0 Newly Introduced),`vector`,`deque`,`list`,`forward_list`(C++2.0 Newly Introduced) - - (2) Associated containers include:`set/multiset`,`map/multimap` - - (3) Unordered container(C++2.0 Newly Introduced,replace `hash_xxx` to `unordered_xxx`) include:`unordered_map/unordered_multimap,unordered_set/unordered_multiset` + - (1) Sequential containers include: `array` (new in C++2.0), `vector`, `deque`, `list`, `forward_list` (new in C++2.0) + - (2) Associative containers include: `set/multiset`, `map/multimap` + - (3) Unordered containers (new in C++2.0, replacing `hash_xxx` with `unordered_xxx`) include: `unordered_map/unordered_multimap`, `unordered_set/unordered_multiset` - [Hash Function](./cpp2.0/cpp11/hash.cpp) - [tuple](./cpp2.0/cpp11/tuple.cpp) - Learning Material:https://www.bilibili.com/video/av51863195?from=search&seid=3610634846288253061 + Learning Material: https://www.bilibili.com/video/av51863195?from=search&seid=3610634846288253061 -### 2.2 C++14/17/20 +#### C++14/17/20 -To Be Continued ... +To be updated... -### 3.Design Pattern +### Design Patterns -- [Singleton pattern](./design_pattern/singleton) +- [Singleton Pattern](./design_pattern/singleton) +- [Producer-Consumer Pattern](./design_pattern/producer_consumer) -### 4. [STL Source Code Analysis](./src_analysis/stl) +### [STL Source Code Analysis](./src_analysis/stl) -**STL Source Code Analysis:gcc 4.9.1** +**STL Source Code Analysis: gcc 4.9.1** - [array](./src_analysis/stl/array.md) - [deque](./src_analysis/stl/deque.md) @@ -209,7 +341,7 @@ To Be Continued ... - [typename](./src_analysis/stl/typename.md) - [traits](./src_analysis/stl/traits.md) - [iterator](./src_analysis/stl/iterator.md) -- [Talking about STL design and EBO optimization](./src_analysis/stl/谈谈STL设计之EBO优化.md) +- [Discussion on STL Design - EBO Optimization](./src_analysis/stl/谈谈STL设计之EBO优化.md) - [rb_tree](./src_analysis/stl/rb_tree.md) - [set and multiset](./src_analysis/stl/set_multiset.md) - [map and multimap](./src_analysis/stl/map_multimap.md) @@ -217,75 +349,75 @@ To Be Continued ... - [myhashtable](./src_analysis/stl/myhashtable.md) - [unordered_map](./src_analysis/stl/unordered_map.md) -### 4. [Concurrent Programming](./concurrency) +### [Concurrency Programming](./concurrency) -#### 4.1 C++ Concurrency in Action +#### C++ Concurrency in Action -- [Chapter One](./concurrency/concurrency_v1/chapter1) -- [Chapter Two](./concurrency/concurrency_v1/chapter2) +- [Chapter 1](./concurrency/concurrency_v1/chapter1) +- [Chapter 2](./concurrency/concurrency_v1/chapter2) -Learning materials: https://chenxiaowei.gitbook.io/cpp_concurrency_in_action/ +Learning Material: https://downdemo.gitbook.io/cpp-concurrency-in-action-2ed/ -#### 4.2 Multithreading And Multiprocess +#### Multithreading and Multiprocess -##### 4.2.1 Threading In C++ +##### Threading In C++ - [Introduction](./concurrency/Threading_In_CPlusPlus/1.thread) - [Five Types of Thread Creation](./concurrency/Threading_In_CPlusPlus/2.create_type) -- [Join And Detaches](./concurrency/Threading_In_CPlusPlus/3.join_detach) +- [Join and Detach](./concurrency/Threading_In_CPlusPlus/3.join_detach) - [mutex in C++ Threading](./concurrency/Threading_In_CPlusPlus/4.mutex) -> From: +> Source: > > https://www.youtube.com/watch?v=eZ8yKZo-PGw&list=PLk6CEY9XxSIAeK-EAh3hB4fgNvYkYmghp&index=4 -### 5. [C++ Conventional method](./codingStyleIdioms) +### [C++ Idioms](./codingStyleIdioms) -##### What is your favorite custom for c ++ programming style? +##### What's your favorite C++ programming idiom? -- [1.ClassInitializers](./codingStyleIdioms/1_classInitializers) -- [2.Replace Enumclass with Namespace](./codingStyleIdioms/2_enumclass) -- [3.RAII(Resource Acquisition Initialization)](./codingStyleIdioms/3_RAII) -- [4.Copy and Swap](./codingStyleIdioms/4_copy-swap) -- [5.pImpl(Pointer Implement)](./codingStyleIdioms/5_pImpl) +- [1. Class Initializers](./codingStyleIdioms/1_classInitializers) +- [2. Replace Enum with Namespace](./codingStyleIdioms/2_enumclass) +- [3. RAII (Resource Acquisition Is Initialization)](./codingStyleIdioms/3_RAII) +- [4. copy and swap](./codingStyleIdioms/4_copy-swap) +- [5. pImpl (Pointer to Implementation)](./codingStyleIdioms/5_pImpl) -### 6.Learning Courses +### Learning Courses -#### 6.1 [Chinese Name:极客时间《现代 C++ 实战 30 讲》](https://time.geekbang.org/channel/home) +#### [GeekTime "Modern C++ in Action 30 Lessons"](https://time.geekbang.org/channel/home) -- [heap、stack、RAII:How to manage resources for C ++ ?](./learn_class/modern_cpp_30/RAII) - - [heap](./learn_class/modern_cpp_30/RAII/heap.cpp) - - [stack](./learn_class/modern_cpp_30/RAII/stack.cpp) +- [Heap, Stack, RAII: How to Manage Resources in C++?](./learn_class/modern_cpp_30/RAII) + - [Heap](./learn_class/modern_cpp_30/RAII/heap.cpp) + - [Stack](./learn_class/modern_cpp_30/RAII/stack.cpp) - [RAII](./learn_class/modern_cpp_30/RAII/RAII.cpp) -- [Implementing smart pointers for C ++](./learn_class/modern_cpp_30/smart_ptr) - - [auto_ptr、scope_ptr](./learn_class/modern_cpp_30/smart_ptr/auto_scope.cpp) +- [Implementing C++ Smart Pointers](./learn_class/modern_cpp_30/smart_ptr) + - [auto_ptr, scope_ptr](./learn_class/modern_cpp_30/smart_ptr/auto_scope.cpp) - [unique_ptr](./learn_class/modern_cpp_30/smart_ptr/unique_ptr.cpp) - [shared_ptr](./learn_class/modern_cpp_30/smart_ptr/shared_ptr.cpp) -- [What exactly does r value and move solve?](./learn_class/modern_cpp_30/reference) - - [L value and R value](./learn_class/modern_cpp_30/reference/reference.cpp) - - [Extend the declaration cycle](./learn_class/modern_cpp_30/reference/lifetime.cpp) - - [Reference folding](./learn_class/modern_cpp_30/reference/collapses.cpp) - - [Perfect forward](./learn_class/modern_cpp_30/reference/forward.cpp) - - [Do not return Reference](./learn_class/modern_cpp_30/reference/don'treturnReference.cpp) -- [Container 1](./learn_class/modern_cpp_30/container1) -- [Container 2](./learn_class/modern_cpp_30/container2) -- [Exception](./learn_class/modern_cpp_30/exception) -- [Literal、Static Assertion And Member Function Specifier](./learn_class/modern_cpp_30/literalAssert) -- [Return Object?](./learn_class/modern_cpp_30/obj) -- [Getting started with generic programming and templates](./learn_class/modern_cpp_30/compilerpoly) -- [A whole Compiler Compute World](./learn_class/modern_cpp_30/compilercompute) -- [SFINAE:What is it if it is not replace error?](./learn_class/modern_cpp_30/SFINAE) -- [constexpr:A Normal World](./learn_class/modern_cpp_30/constexpr) -- [Function object and Lambda:functionLambda](./learn_class/modern_cpp_30/functionLambda) -- [Memory Model and Atomic:Understanding the complexity of concurrency](./learn_class/modern_cpp_30/memorymodel_atomic) +- [What Problem Do Rvalue References and Move Solve?](./learn_class/modern_cpp_30/reference) + - [Lvalue and Rvalue](./learn_class/modern_cpp_30/reference/reference.cpp) + - [Lifetime Extension](./learn_class/modern_cpp_30/reference/lifetime.cpp) + - [Reference Collapsing](./learn_class/modern_cpp_30/reference/collapses.cpp) + - [Perfect Forwarding](./learn_class/modern_cpp_30/reference/forward.cpp) + - [Don't Return Reference of Local Variable](./learn_class/modern_cpp_30/reference/don'treturnReference.cpp) +- [Containers 1](./learn_class/modern_cpp_30/container1) +- [Containers 2](./learn_class/modern_cpp_30/container2) +- [Exceptions](./learn_class/modern_cpp_30/exception) +- [Literals, Static Assertions, and Member Function Specifiers](./learn_class/modern_cpp_30/literalAssert) +- [Should We Return Objects?](./learn_class/modern_cpp_30/obj) +- [Compile-Time Polymorphism: Generic Programming and Template Introduction](./learn_class/modern_cpp_30/compilerpoly) +- [What Can Be Done at Compile Time? A Complete Computing World](./learn_class/modern_cpp_30/compilercompute) +- [SFINAE: What Does "Substitution Failure Is Not An Error" Mean?](./learn_class/modern_cpp_30/SFINAE) +- [constexpr: A Constant World](./learn_class/modern_cpp_30/constexpr) +- [Function Objects and Lambda: Entering Functional Programming](./learn_class/modern_cpp_30/functionLambda) +- [Memory Model and Atomic: Understanding the Complexity of Concurrency](./learn_class/modern_cpp_30/memorymodel_atomic) -### 7.Tools +### Tools -#### 7.1 [Container shortcut output tool](./tool/output) +#### [Container Quick Output Tool](./tool/output) -Modified the code, [Click here for the code](./tool/output/output_container.h) +Modified code, [Click here for the code](./tool/output/output_container.h) -Input: +Input: ```cpp map mp{ @@ -295,55 +427,30 @@ map mp{ cout << mp << endl; ``` -Output: +Output: ```cpp { 1 => 1, 2 => 4, 3 => 9 } ``` -#### 7.2 Output Like Python(Jupyter Notebook) +#### Output Like Python (Jupyter Notebook) -- [How to output like python in C/C++](./tool/像Python一样玩CC++.md) +- [Play with C/C++ Like Python](./tool/像Python一样玩CC++.md) -#### 7.3 Observe the changes in the compilation process +#### Observe Compilation Process - [https://cppinsights.io](https://cppinsights.io/) -#### 7.4 Debug Tools For C ++:dbg-macro +#### C++ Debug Tool dbg-macro -- [Debug Tool: dbg-macro](./tool/C++的Debug工具dbg-macro.md) +- [C++ Debug Tool dbg-macro](./tool/C++的Debug工具dbg-macro.md) -### 8.Expansion +#### Linux Debug Tool rr - Ability to Go Back in Time -#### 8.1 Other Problems -- [How to convert string to in C ++?](./extension/some_problem/string_int.md) +- [Debug with rr](./tool/用rr来进行debug.md) +### Extensions -### 9.Circumstance +#### Some Questions - -- **Running Circumstance** - - Ubuntu 18.04 - -- **IDE** - - CLion gcc/g++ - -### 10.Contributor - - - -| 贡献人 | 地址 | -| ------- | ----------------------------- | -| 光城 | https://github.com/Light-City | -| ChungZH | https://github.com/ChungZH | -| xliu79 | https://github.com/xliu79 | - - - -### 11.About The Writer - -个人公众号: - -![](./img/wechat.jpg) +- [How to convert string to int in C++?](./extension/some_problem/string_int.md)