This cheatsheet provides a curated collection of C and C++ code snippets covering modern language standards, system programming, and development tools. From basic syntax to advanced features like coroutines, templates, and memory management, each example is designed to be clear, practical, and ready to use. All code is tested and compiles cleanly, so you can focus on learning and adapting rather than debugging reference material.
cppcheatsheet is available as a Claude Code plugin. Once installed, Claude automatically uses the cheat sheets to answer C/C++ questions — just ask naturally and the skill triggers based on context.
As a Claude Code plugin (recommended):
# Step 1: Add the marketplace
claude plugin marketplace add crazyguitar/cppcheatsheet
# Step 2: Install the plugin
claude plugin install cppcheatsheet@cppcheatsheetLocal testing (single session only):
claude --plugin-dir /path/to/cppcheatsheetManual installation (requires cloning the repo):
git clone https://github.com/crazyguitar/cppcheatsheet.git
mkdir -p ~/.claude/skills
cp -r cppcheatsheet/skills/cpp ~/.claude/skills/cppCore C language features from C11 to C23, including memory management, preprocessor macros, GNU extensions, and build systems.
Modern C++ features from C++11 to C++23. Covers resource management with RAII and smart pointers, generic programming with templates and concepts, functional patterns with lambdas, compile-time computation with constexpr, and asynchronous programming with coroutines.
- C++ Basics
- Resource Management
- String
- Container
- Iterator
- Template
- Casting
- Constexpr
- Lambda
- Concepts
- Requires
- Time
- Smart Pointers
- Return Value Optimization
- Algorithm
- Coroutine
- Modules
- CMake
POSIX system programming covering process management, file I/O, signals, network sockets, threading, and inter-process communication.
GPU programming with NVIDIA CUDA. Covers kernel basics, memory hierarchy, cooperative groups, memory visibility, asynchronous pipelines, and multi-GPU communication.
- CUDA Basics
- CUDA C++ (libcu++)
- Thrust
- Cooperative Groups
- Memory Visibility
- CUDA Graph
- Quantization
- Pipelines
- GPU-GPU Communication
- NCCL
- Hardware Topology
Command-line tools and shell scripting for system administration, networking, and hardware inspection.
Tools for debugging, memory analysis, and performance profiling of C/C++ and CUDA applications.
Rust programming guide for C++ developers. Maps C++ concepts to Rust equivalents with side-by-side code comparisons covering ownership, traits, error handling, smart pointers, and concurrency.
- Basics
- Ownership & Borrowing
- RAII & Drop
- Strings
- Collections
- Iterators
- Traits & Generics
- Polymorphism
- Casting
- Const Functions
- Closures
- Smart Pointers
- Error Handling
- Threads
- Macros
- Modules
- FFI & C++ Bindings
Deep dives into advanced topics with detailed explanations, low-level implementations, and working code examples.