C++ 学习建议、环境配置等#
危险
以下建议内容中所涉及的, 学习 辩证唯物论 对于学习的作用都是实践事实, 并非所谓粉红无脑爱国才有的捏造.
你凭什么说是实践事实?!
我在 2021 年初正式接触 C++ 并进行学习, 至 2024 年 3 月 8 日写下这段:
阅览 C++ 相关书目并找到记录的有
《C++ Primer Plus, 6th Edition》
《编码:隐匿在计算机软硬件背后的语言》
《Programming: Principles and Practice Using C++, 2nd Edition》
《A Tour of C++, 2rd Edition》
《The C++ Programming Language, 4th Edition》
《世界是数字的》
《Effective C++》
《More Effective C++》
《Effective STL》
《Exceptional C++》
《More Exceptional C++》
《Exceptional C++ Style》
《Effective Modern C++》
《C++ Best Practices》
《The C++ Standard Library, 2nd Edition》
《C++17 - The Complete Guide》
《Modern CMake for C++》
《Beautiful C++》
《Functional Programming in C++》
《C++ Software Design》
《C++ Core Guidelines》
《A Tour of C++, 3rd Edition》
《Elements of Programming》
《From Mathematics to Generic Programming》
阅览 C++ 相关文章并找到记录的有
C++ – an Invisible Foundation of Everything
SG20 Education and Recommended Videos for Teaching C++ - Codeplay Software Ltd
Efficient Programming with Components
Stop using _out_ arguments
How Non-Member Functions Improve Encapsulation | Dr Dobb's
Avoid Manual Loop Unrolling
A note on namespace __cpo – Arthur O'Dwyer – Stuff mostly about C++
artima - The Most Important C++ People...Ever
wg-best-practices-os-developers/Compiler-Options-...
Your “top five” ISO C++ feature proposals – Sutter’s Mill
The C++20 Naughty and Nice List for Game Devs – J...
operator<=> doesn&#39;t obsolete the hidden friend idiom – Arthur O&#39;Dwyer – Stuff mostly about C++
Concepts can&#39;t do quantifiers – Arthur O&#39;Dwyer – Stuff mostly about C++
Solving Undefined Behavior in Factories with constinit from C++20 - C++ Stories
Constrain your user-defined conversions | think-cell
Just how constexpr is C++20&#39;s std::string? – Arthur O&#39;Dwyer – Stuff mostly about C++
Using static and shared libraries across platforms
John Carmack on Functional Programming in C++
C++ Exceptions and Memory Allocation Failure
why choose sum types over exceptions?
Your own error code | Andrzej&#39;s C++ blog
Should structs Have Constructors in C++ - Fluent C++
How boost::is_base_of matches private and/or ambiguous bases – Arthur O&#39;Dwyer – Stuff mostly about C++
Lock-Free Data Structures with Hazard Pointers
Small Object Optimization for Polymorphic Types
How can you be so certan?
C++ Metaprogramming Exercises Vol. I - Ondřej Slámečka
Super-FAQ : Standard C++
Stroustrup: FAQ
C++ Core Guidelines
Google C++ Style Guide
LLVM Coding Standards — LLVM documentation
Issue 2485: get() should be overloaded for const tuple&&
P1601 Recommendations for Specifying &quot;Hidden Friends&quot; · Issue #383 · cplusplus/papers
Repairing input range adaptors and counted_iterat...
Guidelines For snake_case Concept Naming
P0668R5: Revising the C++ memory model
P1450 Enriching type modification traits · Issue #216 · cplusplus/papers
P1634 Naming guidelines for modules · Issue #423 · cplusplus/papers
P1851 Guidelines For snake_case Concept Naming · Issue #601 · cplusplus/papers
[ranges] P2214 A Plan for C++23 Ranges
[ranges] P2760 A Plan for C++26 Ranges
[games] P2966 Making C++ Better for Game Developers -- Progress Report
P2727 R2 std::iterator_interface · Issue #1404 · cplusplus/papers
Proxy Iterators for the Ranges Extensions
P3002 Guidelines for allocators in new library classes · Issue #1671 · cplusplus/papers
N4381 Suggested Design for Customization Points
P2831 Functions having a narrow contract should not be noexcept
P2861 The Lakos Rule: Narrow Contracts and noexcept Are Inherently Incompatible
[SG20] Guidelines for Teaching C++
[SG20] cplusplus/SG20: Study Group 20: Education
Bjarne Stroustrup Quotes | Hacker News
Stroustrup: C++ Glossary
A C++ acronym glossary – Arthur O&#39;Dwyer – Stuff mostly about C++
Acronyms - cppreference.com
The new static constexpr std::integral_constant idiom
术语的翻译
Understanding the different flavors of Clang C and C++ compilers in Windows
enable_shared_from multiple times
std::ranges::begin vs. std::begin
std::ranges::swap vs. std::swap
std::unique_ptr::get
templated operator() vs. templated function
neiboild
oop - C++ Design Pattern library? - Stack Overflow
use of [[nodiscard]]
weakness in neibolids
gsl::not_null<T*> vs. std::reference_wrapper<T> vs. T&
int*_t vs. int_fast*_t vs. int_least*_t
Initializer lists and RHS of operators
initialize two members from a function returning a tuple
use std::cin to initialize a const variable
Current time and date in C++20 days
Can I list-initialize a vector of move-only type?
How to organize includes for a header-only library that wants to expose mutually recursive functions?
Composing boost::variant visitors for recursive variants
what is the new feature in c++20 [[no_unique_address]]?
[[no_unique_address]] and two member values of the same type
CRTP vs derived virtual functions
static constexpr
move assignment
is_convertible_v vs convertible_to
stringstream to_string stoi to_chars from_chars
random number generator: singleton
iterator_category vs iterator_concept
sfinae without decltype
Concept definition requiring a constrained template member function
unspecified types be used in C++20 &#39;requires&#39; expressions
container concept
Unit test naming best practices
std::scoped_lock or std::unique_lock or std::lock_guard?
std::lock_guard or std::scoped_lock?
constexpr variable at namespace scope with and without explicit inline definition
Should const and constexpr variables in headers be inline to prevent ODR violations?
static, extern, inline
Is there a reason why std::make_shared/std::make_unique don&#39;t use list initialization?
Understanding std::atomic::compare_exchange_weak() in C++11
Return value or rvalue reference?
How to use span to wrap up command line args
How to use std::ranges on a vector for a function that needs two arguments?
Why does the implementation of declval in libstdc++-v3 look so complicated?
Is it possible to print a variable&#39;s type in standard C++?
Meaning of acronym SSO in the context of std::string
Why does libc++&#39;s implementation of std::string take up 3x memory as libstdc++?
Cost of std::vector::push_back either succeeding or having no effect?
Branch Prediction
overload of operator<< with basic_ostream
Package Manager: Conan or vcpkg? · Issue #4125 · XRPLF/rippled
CHAR_BIT replacement
Why use mem_fn?
Why does the C++ standard require the Clock::now function to be static?
Should I use static_cast or reinterpret_cast when casting a void* to whatever
Conditional Variable vs Semaphore
random string
Why does c++ ifstream read the file with duplicate records
How to use bit_cast to type pun a unsigned char array
Why is unique_ptr not equality_comparable_with nullptr_t in C++20?
Is it okay to instantiate a new random_distribution every time?
process - How do I execute a command and get the output of the command within C++ using POSIX? - Stack Overflow
c++ - How to concisely express the C++20 concept of range containing T-typed values? - Stack Overflow
Should I use std::function or a function pointer in C++? - Stack Overflow
exception - Implementing a good C++0x error_condition? - Stack Overflow
How do you get the current directory of the C++ executable? - Stack Overflow
c++ - How to implement subcommands using Boost.Program_options? - Stack Overflow
What is the significance of &#39;strongly happens before&#39; compared to &#39;(simply) happens before&#39;? - Stack Overflow
Is sequentially-consistent ordering documentation example still correct with SCfix? : cpp
cppreference.com
cppreference
[calendar] Date and time utilities - cppreference.com
[chrono] List of tz database time zones - Wikipedia
[chrono] Standard library header <chrono> (C++11) - cppreference.com
[concepts] Named Requirements - cppreference.com
[concepts] Standard library header <concepts> - cppreference.com
[fmt] formatter - cppreference.com
[fmt] Format String Syntax
[fmt] {fmt} Formatting & Printing C++ Library | hacking C++
[Modules Report] royjacobson/modules-report
[iterator] Iterator library - cppreference.com
[ranges] Constrained algorithms (since C++20) - cppreference.com
[ranges] Standard library header <ranges> - cppreference.com
[value categories] Value categories - cppreference.com
The C++ Ecosystem in 2023: Growth of C++20, Wider Adoption of Clang-based Tools, AI Gaining Developers’ Confidence | The CLion Blog
C++ Programming - The State of Developer Ecosystem in 2023 Infographic | JetBrains: Developer Tools for Professionals and Teams
CppDevSurvey-2023-summary.pdf
2022 年的 C++ 生态系统:C++17 和 C++20 的快速采用、C++ 工具集格局和更好的代码分析做法 | The CLion Blog
C++ 编程 - 2022 开发者生态系统现状信息图 | JetBrains: Developer Tools for Professionals and Teams
C++ at the end of 2022 - C++ Stories
CppDevSurvey-2022-summary.pdf
阅览 C++ 相关视频并找到记录的有
Back to the Basics! Essentials of Modern C++ Style - Herb Sutter - CppCon 2014
Back to Basics: Virtual Dispatch and its Alternatives - Inbal Levi - CppCon 2019
Back to Basics: Move Semantics (part 1 of 2) - Klaus Iglberger - CppCon 2019
Back to Basics: Move Semantics (part 2 of 2) - Klaus Iglberger - CppCon 2019
Back to Basics: Smart Pointers - Arthur O&#39;Dwyer - CppCon 2019
Back to Basics: Smart Pointers - Rainer Grimm - CppCon 2020
Back to Basics: Exceptions - Klaus Iglberger - CppCon 2020
Back to Basics: Casting - Brian Ruth - CppCon 2021
Back to Basics: Designing Classes (part 1 of 2) - Klaus Iglberger - CppCon 2021
Back to Basics: Designing Classes (part 2 of 2) - Klaus Iglberger - CppCon 2021
Back To Basics: The Special Member Functions - Klaus Iglberger - CppCon 2021
Back to Basics: Lambdas - Nicolai Josuttis - CppCon 2021
Back to Basics: Move Semantics - Nicolai Josuttis - CppCon 2021
Back to Basics: Debugging in C++ - Mike Shah - CppCon 2022
Back to Basics: Templates in C++ - Nicolai Josuttis - CppCon 2022
Back to Basics: Cpp Value Semantics - Klaus Iglberger - CppCon 2022
Back to Basics: (Range) Algorithms in C++ - Klaus Iglberger - CppCon 2023
Back to Basics: Iterators in C++ - Nicolai Josuttis - CppCon 2023
Back to Basics: Debugging in Cpp - Greg Law - CppCon 2023
C++17 in Breadth (part 1 of 2) - Alisdair Meredith - CppCon 2016
C++17 in Breadth (part 2 of 2) - Alisdair Meredith - CppCon 2016
Getting Allocators out of Our Way - Alisdair Meredith & Pablo Halpern - CppCon 2019
Reflection in C++ - Past, Present, and Hopeful Future - Andrei Alexandrescu - CppCon 2022
Expect the expected - Andrei Alexandrescu - CppCon 2018
Reflection in C++ - Past, Present, and Hopeful Future - Andrei Alexandrescu - CppCon 2022
Robots Are after Your Job: Exploring Generative AI for C++ - Andrei Alexandrescu - CppCon 2023
Concepts in 60: Everything you need to know and nothing you don&#39;t - Andrew Sutton - CppCon 2018
Trivially Relocatable - Arthur O&#39;Dwyer - CppCon 2018
Deducing this Patterns - Ben Deane - CppCon 2021
std:: exchange Idioms - Ben Deane - CppCon 2017
Applicative: The Forgotten Functional Pattern in C++ - Ben Deane - CppNow 2023
Lightning Talk: A Static Alternative to Virtual Functions, Using Expression SFINAE - Ben Deane - CppCon 2016
Ligntning Talk: Easing into Modern C++ - Ben Deane - C++Now 2018
Ligntning Talk: How We Used To Be - Ben Deane - CppCon 2020
Lightning Talk: C++20 Lambdas: Familiar Template Syntax - Ben Deane - CppCon 2020
Lightning Talk: The Process Is The Problem - Ben Deane - CppCon 2021
constexpr ALL the Things! - Ben Deane & Jason Turner - CppCon 2017
Operator Overloading: History, Principles and Practice - Ben Deane - CppCon 2018
Keynote: Optimizing for Change in C++ - Ben Deane - CppNorth 2023
Easy to Use, Hard to Misuse: Declarative Style in C++ - Ben Deane - CppCon 2018
Why you should avoid Linked Lists - Bjarne Stroustrup - GoingNative 2012
Make Simple Tasks Simple! - Bjarne Stroustrup - CppCon 2014
The Essence of C++ - Bjarne Stroustrup
Writing Good C++14 - Bjarne Stroustrup - CppCon 2015
The Evolution of C++ Past, Present and Future - Bjarne Stroustrup - CppCon 2016
Learning and Teaching Modern C++ - Bjarne Stroustrup - CppCon 2017
Concepts: The Future of Generic Programming (the future is here) - Bjarne Stroustrup - CppCon 2018
Keynote: What can C++ do for embedded systems developers? - Bjarne Stroustrup - NDC Techtown 2018
C++20: C++ at 40 - Bjarne Stroustrup - CppCon 2019
Plenary: The Beauty and Power of &quot;Primitive&quot; C++ - Bjarne Stroustrup - CppCon 2020
Bjarne Stroustrup: C++ | Lex Fridman Podcast #48
Type-and-resource Safety in Modern C++ - Bjarne Stroustrup - CppCon 2021
C++20: Reaching for the Aims of C++ - Bjarne Stroustrup - CppCon 2021
C++ in Constrained Environments - Bjarne Stroustrup - CppCon 2022
Hardening C++ with Bjarne Stroustrup - BjarneStroustrup - Software Daily
Approaching C++ Safety - Bjarne Stroustrup - Core C++ 2023
Delivering Safe C++ - Bjarne Stroustrup - CppCon 2023
C++17 Features (part 1 of 2) -Bryce Adelstein Lelbach - CppCon 2017
Multidimensional C++ - Bryce Adelstein Lelbach - CppNorth 2022
The C++ Execution Model - Bryce Adelstein Lelbach - CppCon 2018
What is C++ - Chandler Carruth, Titus Winters - CppCon 2019
High Performance Code 201: Hybrid Data Structures - Chandler Carruth - CppCon 2016
LLVM: A Modern, Open C++ Toolchain - Chandler Carruth - Pacific++ 2017
Documentation in the Era of Concepts and Ranges - Christopher Di Bella & Sy Brand - CppCon 2021
Discovering a User-Facing Concept - Christopher Di Bella - CppCon 2021
Removing Metaprogramming From C++, Part 1 of N: constexpr Function Params - David Stone - CppCon 2019
Implementing static_vector: How Hard Could it Be? - David Stone - CppCon 2021
Faster, Easier, Simpler Vectors - David Stone - CppCon 2021
Lightning Talk: Quantum Interpretations of the C++ Object Model - David Stone - CppCon 2021
Ranges for the Standard Library - Eric Niebler - CppCon 2015
Working with Asynchrony Generically: A Tour of C++ Executors (part 1/2) - Eric Niebler - CppCon 2021
Working with Asynchrony Generically: A Tour of C++ Executors (part 2/2) - Eric Niebler - CppCon 2021
Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17 - Jason Turner - CppCon 2016
Thinking Portable: How and why to make your C++ cross platform - Jason Turner - CppNow 2016
constexpr ALL the Things! - Ben Deane & Jason Turner - CppCon 2017
C++ Code Smells - Jason Turner - CppCon 2019
The Best Parts of C++ - Jason Turner - CppCon 2019
(char)0 = 0; - What Does the C++ Programmer Intend With This Code? - JF Bastien - C++ on Sea 2023
Stop Teaching C - Kate Gregory - CppCon 2015
10 Core Guidelines You Need to Start Using Now - Kate Gregory - CppCon 2017
Simplicity: not just for beginners - Kate Gregory [ACCU 2018] - YouTube
Simplicity: Not Just For Beginners - Kate Gregory - CppCon 2018
What Do We Mean When We Say Nothing At All? - Kate Gregory - CppCon 2018
Naming is Hard: Let&#39;s Do Better - Kate Gregory - CppCon 2019
What Do We Mean When We Say Nothing At All? - Kate Gregory [ACCU 2019] - YouTube
Naming is Hard: Let&#39;s Do Better - Kate Gregory - C++ on Sea 2020
Naming is Hard: Let&#39;s Do Better - Kate Gregory - ACCU 2021
Keynote: Abstraction Patterns - Kate Gregory - NDC TechTown 2022
Keynote: Am I A Good Programmer? - Kate Gregory - CppNorth 2022
Abstraction Patterns: Making Code Reliably Better Without Deep Understanding - Kate Gregory - ACCU 2022
Keynote: Become a Better Programmer by Using Words and Ideas From Casual Gaming - Kate Gregory - ACCU 2023
Keynote: Emotional Code - ACCU Conference 2019 - Kate Gregory
Free Your Functions! - Klaus Iglberger - CppCon 2017
Back to Basics: Move Semantics (part 1 of 2) - Klaus Iglberger - CppCon 2019
Back to Basics: Move Semantics (part 2 of 2) - Klaus Iglberger - CppCon 2019
Back to Basics: Exceptions - Klaus Iglberger - CppCon 2020
Back to Basics: Designing Classes (part 1 of 2) - Klaus Iglberger - CppCon 2021
Back to Basics: Designing Classes (part 2 of 2) - Klaus Iglberger - CppCon 2021
Design Patterns: Facts and Misconceptions - Klaus Iglberger - CppCon 2021
Back To Basics: The Special Member Functions - Klaus Iglberger - CppCon 2021
Back to Basics: Cpp Value Semantics - Klaus Iglberger - CppCon 2022
Back to Basics: (Range) Algorithms in C++ - Klaus Iglberger - CppCon 2023
Regular Expressions Redefined in C++ - Hana Dusikova - CppCon 2017
atomic Weapons 1 of 2 - Herb Sutter - C++ and Beyond 2012
atomic Weapons 2 of 2 - Herb Sutter - C++ and Beyond 2012
Lock-Free Programming (or, Juggling Razor Blades), Part I - Herb Sutter - CppCon 2014
Lock-Free Programming (or, Juggling Razor Blades), Part II - Herb Sutter - CppCon 2014
Back to the Basics! Essentials of Modern C++ Style - Herb Sutter - CppCon 2014
Writing Good C++14... By Default - Herb Sutter - CppCon 2015
Leak-Freedom in C++... By Default - CppCon 2016 - Herb Sutter
Thoughts on a more powerful and simpler C++ (5 of N)” - Herb Sutter - CppCon 2018
Extending and Simplifying C++: Thoughts on Pattern Matching using is and as - Herb Sutter - CppCon2021
Meta: Thoughts on generative C++ - Herb Sutter - CppCon 2017
De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable - Herb Sutter - CppCon 2019
Empirically Measuring, & Reducing, C++’s Accidental Complexity - Herb Sutter - CppCon 2020
C++ Standards Committee Fireside Chat hosted by Herb Sutter - CppCon 2020 - YouTube
Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022
Keynote: The Evolution of C++ - A Typescript for C++ - Herb Sutter - CppNow 2023
Plenary: Cooperative C++ Evolution – Toward a Typescript for C++ - Herb Sutter - CppCon 2023
A C++14 approach to dates and times - Howard Hinnant - CppCon 2015
A <chrono> Tutorial - Howard Hinnant - CppCon 2016
Welcome To The Time Zone - Howard Hinnant - CppCon 2016
<chrono> Then and Now - Howard Hinnant - CppCon 2018
Back to Basics: Virtual Dispatch and its Alternatives - Inbal Levi - CppCon 2019
Customization Methods: Connecting User and C++ Library Code - Inbal Levi - CppCon 2023
A C++ Approach to Physical Units - Mateusz Pusz - CppCon 2019
The Nightmare of Move Semantics for Trivial Classes - Nicolai Josuttis - CppCon 2017
The Nightmare of Initialization in C++ - Nicolai Josuttis - CppCon 2018
C++17: The Best Features - Nicolai Josuttis - ACCU 2018
50 shades of C++ - Nicolai Josuttis - Meeting C++ 2018 Closing Keynote
When C++ Style Guides Contradict - Nicolai Josuttis - CppCon 2019
The Hidden Secrets of Move Semantics - Nicolai Josuttis - CppCon 2020
Why and How we fixed std::thread by std::jthread - Nicolai Josuttis - C++ on Sea 2020
Back to Basics: Move Semantics - Nicolai Josuttis - CppCon 2021
C++20: My Favorite Code Examples - Nico Josuttis - Meeting C++ 2021
Back to Basics: Lambdas - Nicolai Josuttis - CppCon 2021
Back to Basics: Templates in C++ - Nicolai Josuttis - CppCon 2022
Belle Views on C++ Ranges, their Details and the Devil - Nico Josuttis - Meeting C++ 2022
Universal/Forwarding References - Nicolai Josuttis - Meeting C++ 2022
Back to Basics: Iterators in C++ - Nicolai Josuttis - CppCon 2023
Using the filter view in practice - Nicolai Josuttis - Meeting C++ 2023
Failing Successfully: Reporting and Handling Errors - Robert Leahy - CppCon 2021
Taking a Byte Out of C++: Avoiding Punning by Starting Lifetimes - Robert Leahy - CppCon 2022
Lightning Talk: I Need a Different Variant in C++ - Robert Allan Hennigan Leahy - C++ on Sea 2023
C++ Seasoning - Sean Parent - GoingNative 2013
Inheritance Is The Base Class of Evil - Sean Parent - GoingNative 2013
Better Code: Data Structures - Sean Parent - CppCon 2015
Better Code: Concurrency - Sean Parent - NDC London 2017
(undefined behaviour) Secret Lightning Talks: Polymorphic Task - Sean Parent - Meeting C++ 2017
Better Code: Human Interface - Sean Parent - CppCon 2018
Better Code: Relationships - Sean Parent - CppCon 2019
Warning: std::find() is Broken! - Sean Parent - CppCon 2021
All the Safeties: Safety in C++ - Sean Parent - CppNow 2023
Better Code: Runtime Polymorphism - Sean Parent - NDC London 2017
Type Deduction and Why You Care - Scott Meyers - CppCon 2014
How to Write Well-Behaved Value Wrappers - Simon Brand - CppCon 2018
Documentation in the Era of Concepts and Ranges - Christopher Di Bella & Sy Brand - CppCon 2021
What’s New in C++23 - Sy Brand - CppCon 2022 - YouTube
STL Features And Implementation Techniques - Stephan T. Lavavej - CppCon 2014
functional: What&#39;s New, And Proper Usage - Stephan T. Lavavej - CppCon 2015
Don&#39;t Help the Compiler - Stephan T. Lavavej - GoingNative 2013
Readable C++ - Timur Doumler - CppCon 2016
Want fast C++? Know your hardware! - Timur Doumler - CppCon 2016
Can I has grammar? - Timur Doumler - CppCon 2018
Class template argument deduction in C++17 - Timur Doumler - CppCon 2018
Type punning in modern C++ - Timur Doumler - CppCon 2019
ISO/IEC 14882 - Timur Doumler - CppCon 2019
C++20: The small things - Timur Doumler - CppCon 2019
How C++20 Changes the Way We Write Code - Timur Doumler - CppCon 2020
Lightning Talk: Direct Aggregate Initialisation - Timur Doumler - CppCon 2021
How C++23 Changes the Way We Write Code - Timur Doumler - CppCon 2022
C++ Lambda Idioms - Timur Doumler - CppCon 2022
Guide to Safety in C++ - Timur Doumler - CppNorth 2023
Lightning Talk: Into the Lambdaverse - Weird C++ Lambda Shenanigans - Timur Doumler - CppNow 2023
Keynote: C++ Contracts, Testing & the Pursuit of Well Defined Behaviour - Timur Doumler - CppNorth23
Maintainability and Refactoring Impact of Higher-Level Design Features - Titus Winters - CppCon 2019
What is C++ - Chandler Carruth, Titus Winters - CppCon 2019
C++ Past vs. Future - Titus Winters - Pacific++ 2018
An Overview of Standard Ranges - Tristan Brindle - CppCon 2019
C++20 Ranges in Practice - Tristan Brindle - CppCon 2020
Quick Game Development with C++11 / C++14 - Vittorio Romeo - CppCon2014
Moving an int Is Slow: Debug Performance Matters! - Vittorio Romeo - ACCU 2022
Lightning Talk: quick-bench.com - Fred Tingaud - CppCon 2017
Lightning Talk: This is Why We Can’t Have Nice Things - Jon Kalb - CppCon 2018
Lightning Talk: One Friend Ain&#39;t Enough - Jody Hagins - CppNow 2021
Lightning Talk: CodeCompass: An open source code navigator for C++ based on LLVM/Clang - Gábor Horváth - CppCon 2016
Lightning Talk: C++ Debug Performance is Improving: What Now? - Vittorio Romeo - CppCon 2022
Lightning Talk: Become A Game Developer In 5 Minutes Or Less - Mathieu Ropert - CppCon 2020
Lightning Talk: MP: ~~Template~~ Meta-Programming in C++ - Kris Jusiak - CppCon 2022
Lightning Talk: Modernizing SFML in Cpp - Chris Thrasher - CppCon 2022
Lightning Talk: Finding Whether a Number is a Power of 2 - Ankur Satle - CppCon 2022
Lightning Talk: C++20 - A New Way of Meta-Programming? - Kris Jusiak - CppCon 2022
Lightning Talk: 2D Graphics with SFML - Lukas Dürrenberger - Meeting C++ 2018 Lightning Talks
Lightning Talk: Static Reflection on the Budget in C++23 - Kris Jusiak - CppNow 2023
Lightning Talk: Writing a Lookup Table in C++ - Richard Smith - CppNow 2023
Lightning Talk: Source/Sink vs. Ranges in C++ - What&#39;s the Difference? - Tony Van Eerd - CppNow 2023
Lightning Talk: Into the Lambdaverse - Weird C++ Lambda Shenanigans - Timur Doumler - CppNow 2023
Lightning Talk: When C++ Singletons Fail... Richard Shepherd - C++ on Sea 2023
Lightning Talks: 5 Things You Didn&#39;t Know Your CPU Did For You - Matt Godbolt - C++ on Sea 2023
Lightning Talks: Reading CSV Files with Standard C++ - Jens Weller - Meeting C++ 2023
105 STL Algorithms in Less Than an Hour - Jonathan Boccara - CppCon 2018
C++23 Standard Library Preview - Jeff Garland - CppCon 2021
C++20’s <chrono> Calendars and Time Zones in MSVC - Miya Natsuhara - CppCon 2021
Back to Basics: Casting - Brian Ruth - CppCon 2021
Variants: Past, Present, and Future - David Sankel - CppCon 2016
Mix Tests and Production Code With Doctest... - Viktor Kirilov - CppCon 2017
Generic Graph Libraries in C++20 - Andrew Lumsdaine & Phil Ratzloff - CppCon 2021
&quot;unit&quot;_test: Implementing a Macro-free Unit Testing Framework from Scratch in C++20 - Kris Jusiak - CppCon 2021
OOP Is Dead, Long Live Data-oriented Design - Stoyan Nikolov - CppCon 2018
Effective replacement of dynamic polymorphism with std::variant - Mateusz Pusz - CppCon 2018
Building a C++ Reflection System in One Weekend Using Clang and LLVM - Arvid Gerstmann - CppCon 2018
clang-useful: Building useful tools with LLVM and clang for fun and profit - P. Goldsborough - CppNow 2017
What&#39;s New in Conan 2.0 C/C++ Package Manager - Diego Rodriguez-Losada - CppCon 2022
GitHub Features Every C++ Developer Should Know - Michael Price - CppCon 2022
Reflection without Reflection TS - Fabian Renn Giles - Meeting C++ 2022
Back to Basics: Debugging in C++ - Mike Shah - CppCon 2022
Refactoring Legacy Codebases with LibTooling - James Bennett - CppCon 2018
Bringing Clang-tidy Magic to Visual Studio C++ Developers - Victor Ciura - CppCon 2017
Time Travel: Applying Gradual Typing to Time Types with Clang&#39;s LibTooling - Hyrum Wright - CppCon 2019
Colonies, performance and why you should care - Matthew Bentley - CppCon 2016
Reproducible Developer Environments in C++ - Michael Price - CppCon 2022
A Test a Day Keeps Your Manager Away! - Rian Quinn - CppCon 2017
Custom Views for the Rest of Us - Jacob Rice - CppCon 2021
What Is an Image? - Will Rosesrans - CppCon 2022
C++ atomics, from basic to advanced. What do they really do? - Fedor Pikus - CppCon 2017
Give me 15 minutes & I&#39;ll change your view of GDB - Greg Law - CppCon 2015
Conan 2.0 demo - Chris McArthur - Meeting C++ online book & tool fair
Abstraction the true superpower of C++ - Guy Davidson - Meeting C++ 2022
Multi Threading Model in Paradox Games: Past, Present and Future - Mathieu Ropert - CppCon 2021
Game Audio Programming in C++ - Guy Somberg - CppCon 2017
What C++ developers should know about globals (and the linker) - Nir Friedman - CppCon 2017
Linux Debuginfo Formats - DWARF, ELF, dwo, dwp - What are They All? - Greg Law - CppCon 2022
import CMake, CMake and C++20 Modules - Bill Hoffman - CppCon 2022
SOLID, Revisited - Tony Van Eerd - CppNow 2021
Data-Oriented Design and C++ - Mike Acton - CppCon 2014
Branchless Programming in C++ - Fedor Pikus - CppCon 2021
GDB: A Lot More Than You Knew - Greg Law - CppCon 2016
What C++ Programmers Need to Know about Header <random> - Walter E. Brown - CppCon 2016
How to Write Effective Documentation for C++ Libraries... - Robert Ramey - CppCon 2017
Adapting C++20 Ranges Algorithms for Most Metaprogramming Needs in Fewer Than 1,000 Lines of Code - Daisy Hollman & Kris Jusiak - CppNow 2023
What&#39;s New in Compiler Explorer? - Matt Godbolt - C++ on Sea 2023
Better Algorithm Intuition - Conor Hoekstra @code_report - Meeting C++ 2019
Typical C++, But Why? - Björn Fahller - CppNorth 2023
Most Malleable Memory Management Method in C++ - Björn Fahller - C++ on Sea 2023
C++ Feature Coroutines, Beginner Friendly - Andreas Fertig - CppNorth 2023
Value Oriented Programming. Part 1: You Say You Want To Write A Function - Tony Van Eerd - CppNorth 22
Value Oriented Programming Part V: Return of the Values - Tony Van Eerd - CppNorth 2023
What Has My Compiler Done for Me Lately? Unbolting the Compiler&#39;s Lid - Matt Godbolt - CppCon 2017
More C++ Ranges Please - Roi Barkan - CppCon 2023
Expressing Implementation Sameness and Similarity: Polymorphism in Modern C++ - Daisy Hollman - CppCon 2023
Exceptionally Bad: The Misuse of Exceptions in C++ & How to Do Better - Peter Muldoon - CppCon 2023
C++ Modules: Getting Started Today - Andreas Weis - CppCon 2023
A Common Package Specification: Getting Build Tools to Talk to Each Other: Lessons Learned From Making thousands of Binaries Consumable by Any Build System - Diego Rodriguez-Losada - CppCon 2023
C++20 Modules: The Packaging and Binary Redistribution Story - Luis Caro Campos - CppCon 2023
Undefined Behavior is Not an Error - Barbara Geller & Ansel Sermersheim - CppCon 2018
How to Build Your First C++ Automated Refactoring Tool - Kristen Shaker - CppCon 2023
Conan 2.0 - C and C++ Package Manager Documentation — conan 2.0.0 documentation
Why not Conan? - Diego Rodriguez-Losada - CppCon 2016
Conan, a C and C++ package manager for developers - Diego Rodriguez-Losada - CppCon 2016
Why not Conan (part II)? - Diego Rodriguez-Lopez - CppCon 2017
Why not Conan (part III)? - Diego Rodriguez-Losada - CppCon 2018
Why Conan? 5 reasons to use Conan package manager - Diego Rodriguez-Losada - CppCon 2019
Why Conan (part II, 5 reasons to use Conan in 2020) - Diego Rodriguez-Losada - CppCon 2020
What&#39;s New in Conan 2.0 C/C++ Package Manager - Diego Rodriguez-Losada - CppCon 2022
What&#39;s new in Conan 2.0 - CoreCppIL - Christopher McArthur
CMake and Conan: past, present and future - Diego Rodriguez-Losada - Meeting C++ 2023
(discouraged) C++ Development with Visual Studio Code - Rong Lu - CppCon 2017
(discouraged) Concepts in C++20: Revolution or Evolution - Rainer Grimm - CppCon 2019
(discouraged) C++20 String Formatting Library: An Overview and Use with Custom Types - Marc Gregoire - CppCon 2020
(discouraged) Back to Basics: Unit Tests - Ben Saks - CppCon 2020
(discouraged) The Hidden Performance Price of C++ Virtual Functions - Ivica Bogosavljevic - CppCon 2022
(discouraged) Text - Corentin Jabot - CppCon 2019
(discouraged) New in Visual Studio Code! Clang-Tidy, makefile, CMake, GitHub, & More - Marian Luparu, Sinem Akinci - CppCon 2022
(discouraged) Back to Basics: Concurrency - Mike Shah - CppCon 2021
(discouraged) This Videogame Programmer Used the STL and You Will Never Guess What Happened Next - Mathieu Ropert - CppCon 2019
(discouraged) Modern C and What We Can Learn From It - Luca Sas - ACCU 2021
(discouraged) Game engine using STD C++ 11 - Jason Jurecka - CppCon 2016
(discouraged) The Quiet Little Gem in Modern C++: <system_error> - Charles Bay - CppCon 2017
(discouraged) Lightning Talk: Cute Approach for Polymorphism in C++ - Liad Aben Sour Asayag - CppCon 2022
(discouraged) I Just Wanted a Random Integer! - Cheinan Marks - CppCon 2016
(discouraged) ASTImporter: Merging Clang ASTs - G. Márton - 2019 LLVM Developers’ Meeting
(discouraged) Lightning Talk: operator for - C++ Generator Ranges Without Coroutine Overhead - Jonathan Müller
(discouraged) C++ Common Knowledge - Dawid Zalewski - Meeting C++ 2023
STL and Its Design Principles - Alexander Stepanov
C++ Weekly
SE.Why -0xFFFFFFFF == 1
Chapter 1 - Answers
Chapter 1 - Notes
Chapter 2 - Answers
Chapter 2 - Notes
Chapter 3 - Notes
Chapter 4 - The Evolution of Lambdas
Chapter 5 - Lambdas To The Limits
6.Intro To Variadic Templates
7.Stop Using std::endl - YouTube
9.std::future Quick-Start
10.Variadic Expansion Wrap-Up
11.std::future Part 2
12.C++17&#39;s std::any
13.Fibonacci: You&#39;re Doing It Wrong
14 Standard Library Gems: next and exchange
15.Using std::bind
16.Avoiding std::bind
17.C++17&#39;s std::invoke
SE.Using C++17&#39;s constexpr if
18.C++17&#39;s constexpr if
20.C++17&#39;s Fold Expressions
21.C++17&#39;s if and switch Init Statements
22.C++17&#39;s Nested Namespaces and std::clamp
23.C++17&#39;s __has_include
24.C++17&#39;s Structured Bindings
25.C++17&#39;s Aggregate Initializations
26.Language Features Removed in C++17
27.C++17 Changes To Sequence Containers
28.C++17&#39;s [[fallthrough]] Attribute - YouTube
29.C++17&#39;s [[maybe_unused]] Attribute - YouTube
30.C++17&#39;s [[nodiscard]] Attribute - YouTube
32.Lambdas For Free
33.Start Using Default Member Initializers
34.Reading Assembly Language - Part 1
35.Reading Assembly Language - Part 2
36.Reading Assembly Language - Part 3
37.Stateful Lambdas
38.C++17&#39;s Class Template Argument Type Deduction
39.C++17&#39;s Deduction Guides
40.Inheriting From Lambdas
41.C++17&#39;s constexpr Lambda Support
42.Clang&#39;s Heap Elision
48.C++17&#39;s Variadic using
49.Why Inherit From Lambdas?
50.Inheriting Lambdas vs Generic Lambdas
51.Advanced Stateful Lambdas
53.Gotos Are Everywhere
60.std::quoted
61.Storage Duration with Lambdas
64.C++11&#39;s std::min (and my version)
65.C++11&#39;s std::fmin
66.Variadic fmin for C++11
67.C++17&#39;s std::gcd and std::lcm
69.C++17&#39;s Searchers
71.Hidden C++ 17 - Part 1
72.Hidden C++17 - Part 2
75.Why You Cannot Move From Const
81.Basic Computer Architecture
83.Installing Compiler Explorer
87.std::optional
88.Don&#39;t Forget About puts
89.Overusing Lambdas
92.function-try-blocks
93.Custom Comparators for Containers
94.Lambdas as Comparators
95.Transparent Comparators
96.Transparent Lambda Comparators
97.Lambda To Function Pointer Conversion
98.Precision Loss with Accumulate
99.C++ 20&#39;s Default Bit-field Member Initializers
100.All The Assignment Operators
106.Disabling Move From const
107.The Power of =delete
108.Understanding emplace_back
109.When noexcept Really Matters
116.Trying Out The Conan Package Manager
122.`constexpr` With optional And variant
123.Using in_place_t
125.The Optimal Way To Return From A Function
126.Lambdas With Destructors
127.C++20&#39;s Designated Initializers
128.C++20&#39;s Template Syntax For Lambdas
129.The One Feature I&#39;d Remove From C++
130.C++20&#39;s for init-statements
132.Lambdas In Fold Expressions
133.What Exactly IS A Lambda Anyhow?
134.The Best Possible Way To Create A Visitor?
135.{fmt} is Addictive! Using {fmt} and spdlog
136.How inline Might Affect The Optimizer
137.C++ Is Not An Object Oriented Language
139.References To Pointers
140.Use cout, cerr, and clog Correctly
141.C++20&#39;s Designated Initializers And Lambdas
142.Short Circuiting With Logical Operators
144.Pure Functions in C++
146.C++20&#39;s std::to_address
149.C++20&#39;s Lambda Usability Changes
150.C++20&#39;s Lambdas For Resource Management
151.C++20&#39;s Lambdas As Custom Comparators
152.Lambdas: The Key To Understanding C++
159.`constexpr` virtual Members In C++20
162.Recursive Lambdas
165.C++20&#39;s is_constant_evaluated()
166.C++20&#39;s Uniform Container Erasure
168.Discovering Warnings You Should Be Using
169.C++20 Aggregates With User Defined Constructors
170.C++17&#39;s inline Variables
171.C++20&#39;s Parameter Packs In Captures
172.Execution Support in Compiler Explorer
173.The Important Parts of C++98 in 13 Minutes
174.C++20&#39;s std::bind_front
175.Spaceships in C++20: operator 〈=〉
176.Important Parts of C++11 in 12 Minutes
177.`std::bind_front` Implemented With Lambdas
178.The Important Parts of C++14 In 9 Minutes
181.Fixing Our bind_front with std::invoke
183.Start Using Raw String Literals
184.What Are Higher Order Functions?
185.Stop Using reinterpret_cast!
186.What Are Callables?
187.C++20&#39;s constexpr Algorithms
188.C++20&#39;s constexpr new Support
189.C++14&#39;s Variable Templates
190.The Important Parts of C++17 in 10 Minutes
192.Stop Using Double Underscores
193.C++20&#39;s contains Members
194.From SFINAE To Concepts With C++20
195.C++20&#39;s constinit
196.What is requires requires?
198.Surprise Uses For explicit Constructors
199.[[nodiscard]] Constructors And Their Uses
200.Christmas Class 2019 - Chapter 1 of 5 - Understanding Lambdas
201.Christmas Class 2019 - Chapter 2 of 5 - Building On Lambdas
202.Christmas Class 2019 - Chapter 3 of 5 - Utilizing Lambdas
203.Christmas Class 2019 - Chapter 4 of 5 - The Evolution of Lambdas
204.Christmas Class 2019 - Chapter 5 of 5 - Lambdas To The Limits
205.Christmas Class 2019 - Chapter 5 of 5 Answers
206.Surprising Conversions with CTAD
207.C++20&#39;s jthread and stop_token
211.C++20&#39;s Bit Manipulation Functions
213.CTRE: Compile Time Regular Expressions
216.C++20&#39;s lerp, midpoint And Why They Are Necessary
218.C++20&#39;s std::to_array
220.C++20&#39;s [[likely]] and [[unlikely]] With Practical use Case
223.Know Your Standard Library: std::nextafter
225.Understanding Operator Overloading
228.C++20&#39;s (High Precision) Mathematical Constants
229.C++20: Why Deprecate The Comma Operator?
231.Multiple Destructors in C++20?! How and Why
232.C++20&#39;s using enum
233.std::map vs constexpr map (huge perf difference!)
234.map[] vs map.at()
237.Teach Yourself C++ in ∞ Days
238.const mutable Lambdas?
239.std::mem_fun vs std::mem_fn Fight!
240.Start Using [[nodiscard]]! - YouTube
241.Using explicit to Find Expensive Accidental Copies
242.Design By Introspection in C++20 (concepts + if constexpr)
246.(+[](){})() What Does It Mean?
249.Types That Shall Not Be Named
251.constexpr Parameters With C++20&#39;s CNTTP
253.C++20 is Official! How To Get Your Copy of the Standard - YouTube
254.C++23&#39;s signed / unsigned size_t Literals
256.C++11&#39;s Garbage Collector
257.Garbage In, Garbage Out - Why Initialization Matters
258.The Awesome Power of C++20&#39;s std::source_location - YouTube
259.CRTP: What It Is, Some History and Some Uses
261.C++20&#39;s New consteval Keyword - YouTube
262.std::string&#39;s 11 Confusing Constructors
264.Covariant Return Types and Covariant Smart Pointers
265.C++20&#39;s std::bit_cast
266.C++20&#39;s std::shift_left and std::shift_right
267.C++20&#39;s starts_with and ends_with
269.How To Use C++20&#39;s constexpr std::vector and std::string
271.string.clear() vs string = &quot;&quot;
276.C++20&#39;s Conditionally explicit Conversions
277.Quick Perf Tip: Avoid Integer Conversions
278.`emplace_back` vs push_back
279.Quick Perf Tip: Use The Right Iterator Comparison
283.Stop Using const_cast!
284.C++20&#39;s Safe Integer Comparisons
287.Understanding auto
288.Quick Perf Tip: Prefer auto
289.Returning From The void
290.C++14&#39;s Digit Separators and Binary Literals
291.Start Using as_const
292.Safely Using goto In C++
296.Constraining auto in C++20
304.C++23&#39;s &#39;if consteval&#39;
307.Making C++ Fun and Accessible
312.Stop Using constexpr (And Use This Instead!)
313.The constexpr Problem That Took Me 5 Years To Fix!
315.constexpr vs static constexpr
318.My Meetup Got Nerd Sniped! A C++ Curry Function
322.Top 4 Places To Never Use const
328.Recursive Lambdas in C++23
328.Recursive Lambdas in C++23
329.How LTO Easily Makes Your Program Faster
330.Faster Builds with extern template (And How It Relates to LTO)
331.This Game Teaches C++!
332.C++ Lambda vs std::function vs Function Pointer
333.A Simplified std::function Implementation
334.How to Put a Lambda in a Container
336.C++23&#39;s Awesome std::stacktrace Library
337.C23 Features That Affect C++ Programmers
339.`static constexpr` vs inline constexpr
340.Finally! A Simple String Split in C++!
341.std format vs lib {fmt}
342.C++20&#39;s Ranges: A Quick Start
343.Digging Into Type Erasure
344.decltype(auto): An Overview of How, Why and Where
345.No Networking in C++20 or C++23! Now What?
346.C++23&#39;s bind_back
347.This PlayStation Jailbreak NEVER SHOULD HAVE HAPPENED
350.The Right Way to Write C++ Code in 2022
354.Can AI And ChatGPT Replace C++ Programmers?
359.std::array&#39;s Implementation Secret (That You Can&#39;t Use!)
361.Is A Better main Possible?
362.C++ vs Python vs Python (jit) vs Python With C++!
363.A (Complete?) Guide To C++ Unions
365.Modulo (%): More Complicated Than You Think
367.Forgotten C++: std::valarray
368.The Power of template-template Parameters: A Basic Guide
371.Best Practices for Using AI Code Generators (ChatGPT and GitHub Copilot)
374.C++23&#39;s out_ptr and inout_ptr
375.Using IPO and LTO to Catch UB, ODR, and ABI Issues
376.Ultimate CMake C++ Starter Template (2023 Updates)
377.Looking Forward to C++26: What C++ Needs Next
378.Should You Ever std::move An std::array?
379.clang-tidy&#39;s &quot;Easily Swappable Parameters&quot; Warning - And How to Fix It!
380.What Are std::ref and std::cref and When Should You Use Them?
381.C++23&#39;s basic_string::resize_and_overwrite
385.The Important Parts of C++20
386.C++23&#39;s Lambda Attributes
391.Finally! C++23&#39;s std::views::enumerate - YouTube
392.Google&#39;s Bloaty McBloatface
393.C++23&#39;s std::unreachable
394.C++11&#39;s Most Overlooked Feature: Delegating Constructors
398.C++23&#39;s zip_view
399.C++23&#39;s slide_view vs adjacent_view
400.C++ is 40... Is C++ DYING?
403.Easier Coroutines with CppCoro
C++ Weekly - 404.How (and Why) To Write Code That Avoids std::move
407.C++98 Code Restoration
408.Implementing C++23&#39;s constexpr unique_ptr in C++20
410.What Are Padding and Alignment? (And Why You Might Care)
Ep 411.Intro to C++ Exceptions - YouTube
412.Possible Uses of C++23&#39;s [[assume]] Attribute
415.Moving From C++98 to C++11
Moving From C++11 to C++14
417.Turbocharge Your Build With Mold?
Ask.`std::exchange` vs std::swap
Cᐩᐩ Weekly With Jason Turner - YouTube
SE.clang-tidy Auto Fixes in Compiler Explorer - Tribute to Hubert Matthews
进行的答疑工作有
我所写 手把手 VSCode 配置教程 目前已累积有 5w 阅读量和 76 条反馈和提问.
2021 年起, 我自发为转计软智网的同学整理资料和答疑.
2021 年起, 在教务处答疑室进行了两期答疑, 第一期未找到记录, 第二期答疑数占总答疑数的 196/617.
2022 年末, 发现教务处答疑室的局限性, 在其中不能比较广泛地对东大 C++ 学习产生影响, 而且经常有重复问题, 故不再报名答疑.
为什么不再在教务处答疑室答疑?
写于 2023 年 6 月 2 日.
因为教务处安排的答疑室形式上有不少不足之处.
- 答疑者能力不足
教务处目前是用 C++ 课程成绩作为答疑者能力的评判标准, 这意味着不少答疑者 (至少我两学期所见) 实际并不了解 C++, 只是基于自己的感性认识在回答. 我所见最有趣的两个回答是:
String& string2 = string1
调用了String
的拷贝赋值函数; 对字符串字面值的存储胡编乱造来作为 "每周一题" 发布 (后已联系改正). 可以不为同学拓展内容, 但应该至少保证所说内容的正确.
- 答疑者答疑不及时
有的答疑者会选择在一天某个时间段集中回答问题, 则此时提问者一般是不在线的, 明明能实时进行的交互答疑却变成了一问一答.
有的答疑者 完全不答疑, 留下的问题第二天的答疑者可能会作答, 可能因为消息同步等原因直接忽视掉.
这样的做法, 再加上 2023 年上半年寒假时根本不去答——那 C++ 期末考试前一天同学一共提出的 45 个问题该怎么办——我寒假中后期决定接手每天回答时, 有不少提问的熟面孔已经不再向答疑室提问.
在此列一下上学期的 C++ 答疑数作为参考 (我的答疑数/平均答疑数/总答疑数): 196/69/617.
- 时间有限
在教务处答疑室中我仅有一天里固定的时间能答疑, 这不能满足我的调查需要.
- 答疑内容无法归档, 方便以后的同学查找
目前教务处答疑室采取的形式是 QQ 聊天中进行提问和回答, 这意味着提问和回答都是一次性的. 即使针对同一个同学, 也很难记起来以前回答过他哪些问题; 而其他同学也无法了解到别的同学所提的问题. 这严重降低了答疑效率和对同学的有用程度.
针对该问题, 负责的同学所提出的解决方案是要求答疑者每周精选题目并提交, 但实际提交时常有敷衍, 且最终采用图片形式呈现. 是的, 代码图片, 也就是无法直接运行的代码! 为了对抗这种形式, 我把每周一题整理在 readthedocs 中, 但这实在过于繁琐了, 最终效果不佳.
- 代码交流困难
QQ 上没有对代码的语法显示, 更没有对代码的直接运行支持. 提问者和答疑者往往以图片、文本、文件等方式进行交流, 而我值班时则尽量以 Compiler Explorer 提供可运行的在线代码链接, 但这些方式总归是间接的.
我的每周一题文档#
2023 年 6 月, 学习了老三篇、两论, 我受其影响而自建答疑室 进行 C++ 答疑工作.
由于个人答疑室的答疑方式对于新手过于复杂且宣传难度高, 一年来答疑人数很少; 2023 年末, 经询问同学意见, 决定为个人答疑室建立群聊.
直到 2023 年 3 月 23 日, 我才有幸阅读了 2021 年双十一时为了凑折扣而买下的《为什么是毛泽东》, 进而有了学习毛选的意愿, 进而学习了老三篇、两论、《毛主席论教育革命》和《辩证法唯物论(讲授提纲)》等一干内容.
我于是发现在以前的学习、答疑经历中, 我早有自我总结出的、实际的辩证法 (即所谓做某事的方法论), 而系统性地应用唯物辩证法之后, 学习和答疑显得更为顺利: 理解了认识从实践中发生而服务于实践, 我不再担心做某事没有把握; 理解了合适的温度能使鸡蛋生出小鸡而不能使石子生出小鸡, 即外因是变化的条件而内因是变化的根据, 我才懂得利用常识进行启发式和反复地答疑最为简单……这无一不在向我证实, 辩证法唯物论确实就是我认识周围世界、改造周围世界的方法, 是我应有的宇宙观、世界观, 因为——也仅仅因为——它站在了与我同样的立场, 也确实能指导我的实践行动.
我们说马克思主义是对的,决不是因为马克思这个人是什么“先哲”,而是因为他的理论,在我们的实践中,在我们的斗争中,证明了是对的。我们的斗争需要马克思主义。我们欢迎这个理论,丝毫不存什么“先哲”一类的形式的甚至神秘的念头在里面。
——1930年5月《反对本本主义》
然而马克思主义看重理论, 正是, 也仅仅是, 因为它能够指导行动. 如果有了正确的理论, 只在把它空谈一会, 束之高阁, 并不实行, 那么这种理论再好也是没有用的.
——1937年7月、8月《辩证法唯物论(讲授提纲)》
我们学习辩证法是为了什么呢? 不为别的, 单单为了要改造这个世界, 要改造这个世界上面人与人、人与物的老关系. 这个世界上面的人类, 大多数过着苦难的日子, 受着少数人所控制的各种政治经济制度的压迫. 在我们中国这个地方生活着的人类, 受着惨无人道的双重性制度的压迫——民族压迫与社会压迫, 我们必须改变这些老关系, 争取民族解放与社会解放.
——1937年7月、8月《辩证法唯物论(讲授提纲)》
C++ 环境配置#
哪怕按下面列出的 Visual Studio 配置教程 (Windows 可用) 对 Visual Studio 进行额外配置, 它对于缺少分号、括号等简单错误的报错依旧非常糟糕, 因此我更建议你使用 VSCode 配置教程 (Windows/MacOS/Linux 均可用).
直接装 Visual Studio (Windows 可用) 就好; 当然更建议按下文配置 Visual Studio 或 VSCode.
如需在线编译运行, 可用 Compiler Explorer, 它能检测
=
错写成==
等 Visual Studio 默认没检查的问题.Visual Studio 配置教程 (Windows 可用), 在 Visual Studio 默认配置基础上添加自动格式化、代码行间显示报错、更多诊断.
VSCode 配置教程 (Windows/MacOS/Linux 均可用), 相比 Visual Studio 配置教程, 它还能 自动添加头文件, 有更丰富的字体和颜色, 且检查代码速度更快.
学习方法#
以下学习方法均参考自
天鹅书第三版第 0 章.读者须知 (第三版第 0 章并不包括第二版第 0 章全部内容. 尤其是, 第三版删去了对天鹅书不采用的教学方法的罗列和解释.)
《毛主席论教育革命》
在学会如何走得好看之前, 先跑起来#
小孩子学走路从来不是从走路开始的, 而是向前猛跑摔倒几次, 有了走路的整体感觉, 再慢下来对各个过程进行准确的理解.
所以建议先将 C++ 整体内容粗略过一遍再进行细节学习, 这粗略的一遍不需要解决 "C++ 如何做到什么", 只需要解决 "C++ 可以做什么". 知道了可以做什么, 便能有效地学习或提问如何去做. 例如, 你不必掌握函数递归怎么写或怎么分析, 但在这一遍中会知道 C++ 可以进行递归.
不要记忆技术细节#
"编程语言特性的存在是为了支持各种程序设计风格和技术. 因此, 编程语言的学习应该更关注掌握其固有的、内在的风格, 而不是试图了解每个语言特性的所有细节."
二进制原码和补码? 我不知道. int
的大小? 我不知道. 运算符的结合性和优先级? 我不知道.
我不知道, 因为我没必要知道. 如果实在需要知道 int
的大小 (它并不固定) 那可以去查, 如果实在不清楚运算符的结合性优先级那可以加括号. 问题在于, 知道这些细节会帮助初学者写出程序吗? 对于初学者, 更重要的是如 在学会如何走得好看之前, 先跑起来 所述建立起对编程的感性认识. 这些细节并不是学习的重点, 且 在有了总体认识后很容易补充上.
考试可能是闭卷考试, 但编程不是, 编程学习过程也不是. 在哪查找中文的 C++ 资料?
实际编程#
请阅读
或更详细的 《实践论》.
或更更详细的 《辩证法唯物论(讲授提纲)》.
明确编程能力不是靠听课听来的, 而是从实际的编程中理解掌握的.
实际的编程并不一定是刷力扣题等 (从考试的角度, 刷力扣题是偏题的; 从编程语言学习的角度, 刷力扣题是有害的), 对于新手来说可以是抄书上例题实际运行进行理解, 可以是对一些突发奇想加以实际验证, 可以是学习练习如何使用软件等等.
学习使用软件#
软件是你的朋友, 手写代码不报错不算什么能力, 能用合适的软件写代码才是能力. 例如, 建议学习:
阅读报错信息.
进行断点调试 查找代码中的逻辑错误.
如何自动格式化代码 查找代码中的语法错误 (少加分号、括号不匹配等).
#include <cassert>
里的assert(condition)
.
学会这些比多刷几道力扣题提升更大.
使用最新的软件#
学习使用软件 中所说的用合适的软件还意味着 你应该用最新的软件.
如果仅仅因为考试时用的软件是 Dev-C++、VS 2010 等就在平时的学习中使用这些软件, 只会严重影响新手的学习: 它们因为过老不会为新手提供某些报错, 甚至可能没有 断点调试 或 自动格式化 等功能.
既然有的新手所主张的 "面向考试学习" 是为了考试取得好成绩, 使用这些影响自己学习的软件岂不是本末倒置? 上文 在学会如何走得好看之前, 先跑起来 已经强调了, 新手需要在走得好看之前跑起来, 而当新手通过在 最新软件 上持之以恒地练习从而入门程序设计后, 熟悉考试软件只需要一两天时间.
此外, 哪怕按 Visual Studio 配置教程 (Windows 可用) 对 Visual Studio 进行额外配置, 它对于缺少分号、括号等简单错误的报错依旧非常糟糕, 我更建议你使用 VSCode 配置教程 (Windows/MacOS/Linux 均可用).
不要通过询问人工智能大模型学习#
人工智能大模型如 chatgpt 等不存在同理心, 主观上并不知道什么代码是好的, 什么代码是适合初学者的等等. 因此, 询问它所获得的建议往往会影响你的学习. 我基本一直在群里, 如果有问题, 请尝试询问我解决.
如果实在需要使用人工智能大模型, 请在提问时加上:
点击查看提示词
如果觉得看不懂, 将第 3 条第 1 点从 C++20 改为 C++98.
<input>
填入你的问题
</input>
<thinking>
Before answer questions as requested, think and output IN CHINESE within <thinking> tag, insert a newline after every item and tag
1. Infer specific mistakes at least 5, refer to 《C++ Core Guidelines》
- ...
2. Reconstruct the question by <inputs>
- ...
3. Check to use every force patch to against confusion:
- [ ] <HIGHEST PRIORITY> YOU MUST ONLY USE C++20 STANDARD no matter what is forced in the following </HIGHEST PRIORITY>
- [ ] List what new features that aren't currently in the code you'd like to use and why you think them make the code even better
- [ ] Obey best practices specified in 《C++ Core Guidelines》
- [ ] Keep the code simple so novices can understand it
4. Bayes decision step 1
- Deduce 4 reasonable answer directions as the 1st part in concise sentence. Evaluate them by: If illogical; If not compilable; If too expert; If lack proactivity. Set their weight W (SUM(W)=100).
a. {{Direction}}|{{Evaluation}}|{{W}}
b…
- Execute direction with highest W. Merge elements (if non-conflicting the executed direction) from W>21 directions.
5. Bayes decision step 2 (the exact same way to analyze the 2nd part plot)
6. Answer processing
- …
7. Say anything as well-known modern C++ educator for current question
</thinking>
output the chosen answer...
当然你也可以在配置 VSCode 后切换为使用 Cursor 这个 ai 编辑器.
更多学习方法#
更多学习方法请直接阅读 天鹅书第二版第 0 章.读者须知 和《毛主席论教育革命》.
非应试自学学习路径#
学习路径分为 非应试自学学习路径 和 应试教育学习路径. 非应试入门其实更为简单, 并且如果已经非应试入门, 补全应试知识点不过是一两天的事.
为什么会有应试和非应试的区别?
C++ 越新越简单, 但很多教学 (尤其是大学中) 采用了旧版 C++, 因为:
老师并不都以 C++ 为主要语言, 对 C++ 使用理念和发展路线不太熟悉.
课程教 C++ 只是在利用 C++ 多编程范式的特点, 让学生了解诸如面向对象、面向过程、数据抽象等编程范式, 并不着重于学好 C++.
课程大纲偷懒不愿更新罢了, 很多老师的 PPT 仍是十几年前的, 而实验作业也是祖传的 (甚至其中诸多错误始终没更正).
C++ 拥有 "向后兼容性", 即新版本也能直接使用依据旧版本编写的代码. 这种 "向后兼容性" 本意是为了让程序员流畅地学习新版本特性, 同时保证旧有代码依然能执行, 但却被人利用来躲在旧版本舒适区.
新版本 C++ 拥有更简单的语法、更灵活的特性, 一套完整规范的 C++ Core Guidelines (C++ 核心准则) 和每年举行的诸多社区分享活动 (CppCon、CppNow、cpponsea……).
应试教育学习路径#
我个人完全不推荐应试教育学习路径, 它只会教一些 C++ 语法, 不会教程序设计的思路、方法、原理或技术. 当我说学 C++ 时, 从来都是包括设计哲学、最佳实践、设计模式、惯用法、工具链使用等在内, 这些综合起来才是 C++.
如果你只是想考试拿高分, 那么 非应试自学学习路径 更简单、更适合你. 如果还有疑虑, 请再阅读上方的学习方法, 并请尝试阅读:
这里还保留应试教育学习路径, 仅仅是为了告诉你我了解它们, 知道它们有多么糟糕.
网课参考#
教材参考#
看书记得看前言! 看书记得看前言! 看书记得看前言!
- 《C++ Primer Plus》
矮子里的高个, 我针对应试唯一推荐的书, 看书一个月左右即可速通 C++ 上下册所有内容 (如果感觉看书有难度, 可以先看一部分上面的网课领会).
- 《C++ 程序设计实践教程(机械工业出版社)》
部分非电类专业 C++ 用的教材, 虽然不怎么好, 但写得比《C++ 大学教程》清晰地多. 如果不想新买书, 可以考虑用这本.
但还是有非常非常糟糕的部分, 比如将内置类型和用户自定义类型割裂开来, 明明用户自定义类型的传参等跟内置类型没有区别, 却进行强行解释, 完全不符合 C++ 的设计原则——为用户自定义类型提供与内置类型同等的支持.
- 《C++ How to Program, 9th Edition》(《C++ 大学教程(第9版)》)
电类 C++ 用的教材, 但 个人 完全不推荐, ACCU 给出最低分的垃圾书. 简单列一些问题:
使用
for (int i = 1; i <= 5; ++i)
而不是更符合语言习惯的for (int i = 0; i < 5; ++i)
.使用
explicit
而不解释为什么, 而且使用方法完全错误.第一次写构造函数时就用了成员初始化列表且没给出合理解释, 让人以为构造函数不能作为正常函数看待.
第一次用
std::sort
算法时没有任何解释, 几百页后才解释std::sort
到底怎么用.……
- 《C++ 程序设计(朱金付主编)》
快跑!!! 简单列一些问题:
展示拷贝构造函数和拷贝赋值函数时, 参数使用
&
, 实际应该使用 const&.解释链表时使用有序链表, 导致读者连怎么插入删除都搞不懂.
……
习题参考#
- 《C++ Primer Plus》课后习题
主要是语法的练习. github 上可找到别人完成的版本作为解答的参考.
应对上机考试的进阶内容, 有余力可用
尤其是转专业考试, 强烈建议在应试学习基础上学习这些内容, 即学习范围为
课内必修
C++98/03 (即应试网课、教材所教授的版本)
淡化指针 (很多地方都能用引用代替)
std::string
基本用法.std::vector<Type>
基本用法.
可选
std::stringstream
: 用于数字和字符串间的转换和分割单词等. 可用于 2023 年计软智转专业上机第 1 题, 秒杀 2022 年网安转专业编写程序题第 1 题.STL 容器基本用法
std::vector<Type>
: 动态数组, 且无需手动管理内存.std::array<Type, size>
: 固定长度的数组, 且不会隐式类型转换为首元素的指针.std::map<Key, Value>
: 关联数组. 可秒杀 2021 年计软智转专业第 3 题.std::set<Key>
: 元素唯一且自动排序. 2020 年计软智转专业第 4 题和 2023 年计软智转专业上机第 2 题均考了此概念.
STL 算法 + Lambdas
C++11 的基于范围的 for 循环 + auto 基本用法
1// auto: 我不在乎 array 里的元素 value 类型具体是什么, 编译器你自己搞定; 2// 我只要求你把它按 const& 传给 value 3for (const auto& value : array) { 4 std::cout << value << ' '; 5}
C++ 资料查询#
C++ 术语不全书#
这一个应该足够了, 遇到不理解的再去查就行, 没必要全部记忆. 其余术语网站可以在 我的 C++ 浏览器书签 (2024/08/30) (右键另存为再导入到浏览器) 中找到.