Get the most from each lesson's compiled editor—the same habits transfer to VS Code, clangd, and CI running g++ -Wall -Wextra.
Recommended workflow
- Read the concept section before editing code.
- Click Run to compile with
g++and execute. - Use
std::coutfor debug output; include<iostream>. - Fix warnings immediately—they often signal real bugs.
What the runner can and cannot do
- Can — single-file
main.cppwith standard headers - Needs local setup — multi-file CMake projects, separate template headers, GPU APIs
Review C, JavaScript, Java, and Rust for comparison context.
Self-check
- What stream object prints to stdout in C++ lessons?
- What flag enables common warnings with g++?
Challenge
First compile and run
- Click Run with the default code.
- Confirm output appears in the terminal.
- Add a second
std::coutline with your name.
Done when: the terminal shows the default message and your custom line.
Challenge
Verify compile output
- Run the default program.
- Confirm output in the terminal.
- Add a deliberate unused variable and observe -Wall.
- Fix and run again.
Done when: you see compiler warnings when appropriate and clean output after fixing.
Interview prep
- What compiler flags should beginners enable?
-std=c++17 -Wallat minimum; add-Wextraand-glocally for deeper diagnostics and debugging.