Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
cppcheatsheet logo

cppcheatsheet

cppcheatsheet

OtherClaude Codeby crazyguitar

Summary

Comprehensive C/C++ programming reference covering modern C11-C23, C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics

Install to Claude Code

/plugin install cppcheatsheet@cppcheatsheet

Run in Claude Code. Add the marketplace first with /plugin marketplace add crazyguitar/cppcheatsheet if you haven't already.

README.md

==================== C/C++ Cheatsheet ====================

.. image:: https://img.shields.io/badge/doc-pdf-blue :target: https://cppcheatsheet.readthedocs.io/_/downloads/en/latest/pdf/

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):

.. code-block:: bash

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):

.. code-block:: bash

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

Manual installation (requires cloning the repo):

.. code-block:: bash

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

C/C++ Interview Cheatsheet ==========================

Curated C and C++ interview questions indexed by topic — each question links directly to the section of the cheat sheet that answers it. Use it for quick review before an interview, or to drill down on a specific area (RAII, move semantics, templates, concurrency, and more).

  • C/C++ Interview Cheatsheet <docs/notes/interview/index.rst>_

Modern C Programming ====================

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

  • C Basics <docs/notes/c/c_basic.rst>_
  • Memory <docs/notes/c/c_memory.rst>_
  • Preprocessor & GNU Extensions <docs/notes/c/c_macro.rst>_
  • Makefile <docs/notes/c/make.rst>_
  • X86 Assembly <docs/notes/c/asm.rst>_

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.

  • C++ Basics <docs/notes/cpp/cpp_basic.rst>_
  • Resource Management <docs/notes/cpp/cpp_raii.rst>_
  • Move Semantics <docs/notes/cpp/cpp_move.rst>_
  • String <docs/notes/cpp/cpp_string.rst>_
  • Container <docs/notes/cpp/cpp_container.rst>_
  • Iterator <docs/notes/cpp/cpp_iterator.rst>_
  • Template <docs/notes/cpp/cpp_template.rst>_
  • Casting <docs/notes/cpp/cpp_casting.rst>_
  • Polymorphism <docs/notes/cpp/cpp_polymorphism.rst>_
  • Type Erasure <docs/notes/cpp/cpp_type_erasure.rst>_
  • Constexpr <docs/notes/cpp/cpp_constexpr.rst>_
  • Lambda <docs/notes/cpp/cpp_lambda.rst>_
  • Concepts <docs/notes/cpp/cpp_concepts.rst>_
  • Requires <docs/notes/cpp/cpp_requires.rst>_
  • Time <docs/notes/cpp/cpp_time.rst>_
  • Smart Pointers <docs/notes/cpp/cpp_smartpointers.rst>_
  • Return Value Optimization <docs/notes/cpp/cpp_rvo.rst>_
  • Algorithm <docs/notes/cpp/cpp_algorithm.rst>_
  • Coroutine <docs/notes/cpp/cpp_coroutine.rst>_
  • Modules <docs/notes/cpp/cpp_modules.rst>_
  • CMake <docs/notes/cpp/cpp_cmake.rst>_

System Programming ==================

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

  • Process <docs/notes/os/os_process.rst>_
  • File <docs/notes/os/os_file.rst>_
  • Signal <docs/notes/os/os_signal.rst>_
  • Socket <docs/notes/os/os_socket.rst>_
  • Thread <docs/notes/os/os_thread.rst>_
  • IPC <docs/notes/os/os_ipc.rst>_

CUDA Programming ================

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

  • CUDA Basics <docs/notes/cuda/cuda_basics.rst>_
  • CUDA C++ (libcu++) <docs/notes/cuda/cuda_cpp.rst>_
  • Thrust <docs/notes/cuda/cuda_thrust.rst>_
  • Cooperative Groups <docs/notes/cuda/cuda_coop_groups.rst>_
  • Memory Visibility <docs/notes/cuda/cuda_memory_visibility.rst>_
  • CUDA Graph <docs/notes/cuda/cuda_graph.rst>_
  • Quantization <docs/notes/cuda/cuda_quantization.rst>_
  • Pipelines <docs/notes/cuda/cuda_pipelines.rst>_
  • GPU-GPU Communication <docs/notes/cuda/cuda_ipc.rst>_
  • NCCL <docs/notes/cuda/cuda_nccl.rst>_
  • Hardware Topology <docs/notes/cuda/cuda_hwloc.rst>_

Bash & System Tools ===================

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

  • Bash <docs/notes/tools/bash.rst>_
  • Operating System <docs/notes/tools/os.rst>_
  • Network <docs/notes/tools/net.rst>_
  • Hardware <docs/notes/tools/hardware.rst>_
  • GPU <docs/notes/tools/gpu.rst>_
  • Systemd <docs/notes/tools/systemd.rst>_

Debugging & Profiling =====================

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

  • GDB <docs/notes/debug/gdb.rst>_
  • Valgrind <docs/notes/debug/valgrind.rst>_
  • Sanitizers <docs/notes/debug/sanitizers.rst>_
  • Tracing <docs/notes/debug/tracing.rst>_
  • Perf <docs/notes/debug/perf.rst>_
  • Nsight Systems <docs/notes/debug/nsight.rst>_
  • Binary Tools <docs/notes/debug/binary_tools.rst>_

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.

  • Basics <docs/notes/rust/rust_basic.rst>_
  • Ownership & Borrowing <docs/notes/rust/rust_ownership.rst>_
  • RAII & Drop <docs/notes/rust/rust_raii.rst>_
  • Strings <docs/notes/rust/rust_string.rst>_
  • Collections <docs/notes/rust/rust_container.rst>_
  • Iterators <docs/notes/rust/rust_iterator.rst>_
  • Traits & Generics <docs/notes/rust/rust_traits.rst>_
  • Polymorphism <docs/notes/rust/rust_polymorphism.rst>_
  • Casting <docs/notes/rust/rust_casting.rst>_
  • Const Functions <docs/notes/rust/rust_constfn.rst>_
  • Closures <docs/notes/rust/rust_closure.rst>_
  • Smart Pointers <docs/notes/rust/rust_smartptr.rst>_
  • Error Handling <docs/notes/rust/rust_error.rst>_
  • Threads <docs/notes/rust/rust_thread.rst>_
  • Macros <docs/notes/rust/rust_macros.rst>_
  • Modules <docs/notes/rust/rust_modules.rst>_
  • FFI & C++ Bindings <docs/notes/rust/rust_ffi.rst>_

Blog ====

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

  • Building NVSHMEM from Scratch: GPU-Initiated Networking <docs/notes/blog/nvshmem.rst>_

Related plugins

Browse all →