Skip to content
Learn Netverks

Lesson

Step 5/36 14% through track

playground-workflow

Playground workflow

Last reviewed May 28, 2026 Content v20260528
Track mode
server_compiled
Means
Compiled runner
Reading
~2 min
Level
beginner

This lesson

This lesson teaches Playground workflow: the syntax, patterns, and safety habits you need before advancing in C++.

Coroutines replace callback hell on Android and in Ktor—structured concurrency is interview-critical.

You will apply Playground workflow in contexts like: Game engines, trading systems, desktop apps, and performance-critical libraries.

Write C++ in main.cpp with int main(), click Run on server—the dev runner compiles with c++/g++ -std=c++17 -Wall and runs the binary; read template errors in stderr (LEARNING_RUNNER_ENABLED=true). Also include iostream and use std::cout; keep everything in one main.cpp for the sandbox.

At the start of the track—complete before lessons that assume you understand the compiled playground.

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

  1. Read the concept section before editing code.
  2. Click Run to compile with g++ and execute.
  3. Use std::cout for debug output; include <iostream>.
  4. Fix warnings immediately—they often signal real bugs.

What the runner can and cannot do

  • Can — single-file main.cpp with 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

  1. What stream object prints to stdout in C++ lessons?
  2. What flag enables common warnings with g++?

Challenge

First compile and run

  1. Click Run with the default code.
  2. Confirm output appears in the terminal.
  3. Add a second std::cout line with your name.

Done when: the terminal shows the default message and your custom line.

Challenge

Verify compile output

  1. Run the default program.
  2. Confirm output in the terminal.
  3. Add a deliberate unused variable and observe -Wall.
  4. 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 -Wall at minimum; add -Wextra and -g locally for deeper diagnostics and debugging.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • g++ error read how?
  • iostream vs printf?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump