C++知识点概要.md


作者Lou Xiao创建时间2025-04-02 04:32:18更新时间2025-04-02 04:32:18

C++语言概要

  1. 基础数据类型(Fundamental Types)
    • bool
    • char: unsigned char, signed char, char8_t, char16_t, char32_t, wchar_t
    • integer number: { unsigned | unsigned } { char | short | int | long | long long }
    • float number: float, double, long double
    • pointer
    • reference: lvalue reference, rvalue reference
    • C-style array
  2. function
    • parameter: pass by value, pass by pointer, pass by lvalue reference, pass by rvalue reference
    • return: return by value, return by pointer, return by lvalue reference, return by rvalue reference
    • function overload
    • template function
    • lambda function
    • function object:functor
  3. enum, enum class
  4. struct and class
    • class define and implement
      • data member
        • static data member
        • const data member
        • constexpr data member
      • member function
      • static member function
        • constexpr static member function
      • instance member function
        • const, non-const
        • lvalue reference, rvalue reference
        • constructor
          • default constructor
        • 5 specific member function
          • copy constructor
          • copy assignment operator
          • move constructor
          • move assignment operator
          • destructor
    • inherit class
    • abstract class
    • template class: virtual function and override
  5. STL
    • container: array, vector, list, deque, set, map, unordered_map, unordered_set, stack, queue
    • smart pointer: shared_ptr, unique_ptr, week_ptr
    • algorithm: find, sort, insert, remove
  6. standard library

common problem

  1. memory manager and RAII
    • smart pointer
    • object pool
    • custom memory allocator
  2. value sematic
  3. object sematic
  4. concurrent and parallel
    • sync sematic: mutex, semaphore, atomic
    • memory model: memory_order_acquire, memory_order_release, memory_order_acquire_release, memory_order_relaxed
    • threading
    • process

design pattern

  1. singleton pattern
  2. factory, factory method, abstract factory
  3. observer pattern
  4. strategy pattern
文章目录