Skip to content

crazyguitar/cppcheatsheet

Repository files navigation

C/C++ Cheatsheet

https://img.shields.io/badge/doc-pdf-blue

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.

Plugin

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.

Installation

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@cppcheatsheet

Local testing (single session only):

claude --plugin-dir /path/to/cppcheatsheet

Manual installation (requires cloning the repo):

git clone https://github.com/crazyguitar/cppcheatsheet.git
mkdir -p ~/.claude/skills
cp -r cppcheatsheet/skills/cpp ~/.claude/skills/cpp

Modern C Programming

Core C language features from C11 to C23, including memory management, preprocessor macros, GNU extensions, and build systems.

Modern C++ Programming

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.

System Programming

POSIX system programming covering process management, file I/O, signals, network sockets, threading, and inter-process communication.

CUDA Programming

GPU programming with NVIDIA CUDA. Covers kernel basics, memory hierarchy, cooperative groups, memory visibility, asynchronous pipelines, and multi-GPU communication.

Bash & System Tools

Command-line tools and shell scripting for system administration, networking, and hardware inspection.

Debugging & Profiling

Tools for debugging, memory analysis, and performance profiling of C/C++ and CUDA applications.

Rust for C++ Developers

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.

Blog

Deep dives into advanced topics with detailed explanations, low-level implementations, and working code examples.

Sponsor this project

 

Packages

 
 
 

Contributors