语言

C++ 快速参考

C++ 快速参考 的可打印速查表,适合快速查阅、学习和桌边参考

来源
C++ Reference (cppreference.com)
许可证
MIT
更新时间
2026-03-27

示例

速查表包含什么

  • 基础
  • 类
  • 模板
  • STL 容器
  • 迭代器与算法
  • 智能指针
  • Lambda
  • 字符串与 I/O
  • 异常处理
  • 现代 C++(17/20)

Hello World

#include <iostream>
int main() {
    std::cout << "Hello, World!" << std::endl;
    return 0;
}

编译与运行

g++ -std=c++20 -Wall -o app main.cpp
./app
clang++ -std=c++20 -o app main.cpp

变量与常量

int x = 42;
auto y = 3.14;             // type deduction
const int MAX = 100;
constexpr int SIZE = 256;  // compile-time constant

下载完整速查表,获取所有章节的打印排版版本

下载 PDF

下载

选择适合你阅读方式的版本