cppnb — C++ Notebook
VS Code Extension · Published by 06Neel
About
cppnb brings the Jupyter notebook experience to C and C++ development inside Visual Studio Code. Instead of compiling and running full programs every time, you write code in individual cells — execute them independently, persist state across them, and see inline output instantly.
Ideal for learning C++, experimenting with algorithms, doing competitive programming dry runs, or prototyping data structures — without leaving your editor.
Key Features
cin, getline, scanf
cppnb.prettyUI
Getting Started
Install MinGW-w64 and make sure g++ is in your system PATH. Verify with where g++ in terminal.
Search cppnb in VS Code Extensions panel or install directly from the Marketplace link above.
Press Ctrl + Shift + P and run C++ Notebook: New Notebook. Save with the .cppnb extension.
Write State Cells (no main()) to define functions and variables, then Run Cells (with main()) to execute and see output.
Example
A State Cell defines a reusable function. A Run Cell calls it with main():
Settings
| Setting | Default | Description |
|---|---|---|
| cppnb.compilerPath | C:\MinGW\bin\g++.exe | Path to your g++ compiler |
| cppnb.std | c++17 | C++ standard used for compilation |
| cppnb.timeoutMs | 5000 | Execution timeout per cell (ms) |
| cppnb.extraArgs | [] | Extra arguments passed to g++ |
| cppnb.askForInput | auto | When to prompt for input: auto / always / never |
| cppnb.prettyUI | true | Show formatted output blocks |
All Tools