Build with C++ · free beginner course

Learn C++ by seeing what your code does.

Free beginner C++ course in your browser: draw on a canvas, see values and references in memory, grow vectors, and build a Tic-Tac-Toe game.

6 modules · about 7 hoursFree

Your Learning Path

Each module builds on the last. Open any published lesson or lab and continue at your own pace.

1

Draw with C++Make something you can see

Your first C++ programs draw on a canvas. Meet typed variables, function calls and a for loop, then paint with clicks, and learn to read what the compiler tells you.

You build: A robot, a row of circles, and click painting

  • types
  • variables
  • function calls
  • for loops
  • compiler errors
Free50 min
2

Make It BehaveTeach your program to decide and repeat

Use if and else, comparisons, nested loops and bool to build a signal lamp, a checkerboard and a click target, print your first output with std::cout, and see which variables exist where.

You build: A signal lamp, a checkerboard, and a click target

  • if / else
  • nested loops
  • bool
  • std::cout
  • scope
Free65 min
3

Functions, Values & ReferencesPackage instructions, and see where your data lives

Write functions that draw and functions that return, then watch a copy and a reference side by side in memory. Finish with const references and a garden built from your own functions.

You build: Flowers, a copy-versus-reference view, and a garden

  • functions
  • pass by value
  • references
  • const references
Free65 min
4

Strings and VectorsCollections that grow, and where they live

Spell a word letter by letter, grow a std::vector and watch it move to a bigger buffer, change elements through references in a range-for, and count every letter of a sentence into a histogram.

You build: A growing vector you can watch, and a letter histogram

  • std::string
  • std::vector
  • size and capacity
  • range-for
Free70 min
5

Structs and Program StateGive your program a memory of its own

Name every state a cell can be in with enum class, keep a whole game in one struct, turn a click into a cell and a legal move, and see what a struct weighs in memory.

You build: A Tic-Tac-Toe board model that accepts legal moves

  • struct
  • enum class
  • program state
  • sizeof
Free80 min
6

Build Tic-Tac-ToeFinish a game you can play

Find a winner with the winning lines as data and std::optional, tell a win from a draw, play the whole game by clicking, and add a computer opponent.

You build: A playable Tic-Tac-Toe game with a computer opponent

  • decomposition
  • std::optional
  • validation
  • game logic
Free85 min

Who this course helps

  • First-time programmers who want to start with C++ without fighting a toolchain
  • Students taking a C++ class who want to see what references and vectors actually do
  • Python or JavaScript programmers who want to understand what C++ does differently

A playable Tic-Tac-Toe game and a set of visual C++ programs you wrote

  • Write C++17 with types, loops, conditions and functions
  • See copies, references and vectors in memory
  • Build a playable Tic-Tac-Toe game with a computer opponent

Every exercise draws what your C++ does, and the memory view shows what a copy, a reference or a growing vector really is, so the language stops being a set of rules to memorise.

About This Course

Write real C++17 in your browser and see what your program does. Every module is a set of exercises that run on the page: clang compiles your code right there, the picture shows what it drew, and checks tell you when an exercise works. When something goes wrong, the compiler's message appears beside the line it is about, with a plain explanation for the mistakes beginners make most.

The six free modules start with drawing and decisions, then look underneath: a copy and a reference side by side in memory, a std::vector moving to a bigger buffer as it grows, and what a struct weighs. They finish with a playable Tic-Tac-Toe game with a computer opponent. No account, installation or local setup is needed; your code is compiled and run in your browser.

A later track is being written: object lifetime, ownership and smart pointers, how std::vector really works, the STL, and interview algorithms.

Prerequisites

  • No programming experience required

What You Will Learn

  • Write, compile and fix small C++17 programs, reading compiler errors as information
  • Use types, variables, conditions, loops and functions to build visual and interactive programs
  • Explain the difference between passing by value, by reference and by const reference, and see it in memory

Build with C++: frequently asked questions

Do I need to install a compiler?

No. Your code is compiled by clang inside your browser, so there is nothing to install and no account to create. Nothing is sent to a server.

Is it real C++?

Yes. The exercises are standard C++17, compiled by clang 21 to WebAssembly and run on the page. Programs include the standard headers they use, just as they would on your own computer.

Is Build with C++ free?

Yes. All six modules listed on this page are free, with no account or payment.

Can I learn C++ as my first language?

Yes. No programming experience is required. Module 1 starts with drawing on a canvas, and compiler errors are treated as information: the message appears beside the line it is about, with a plain explanation.

How long does the course take?

About 7 hours in total: six modules of 50 to 85 minutes each. The first run of a session downloads the compiler, so it takes a little longer than the runs after it.

What will I build?

A robot drawing and click painting, a checkerboard and a click target, a garden drawn by your own functions, a letter histogram, and a playable Tic-Tac-Toe game with a computer opponent.

How is this different from other C++ tutorials?

Most tutorials explain references, vectors and structs in words. Here you see them: a copy and a reference side by side in memory, a vector moving to a bigger buffer as it grows, and the bytes a struct takes up, all from the code you just wrote.

Module 1: Draw with C++

Make something you can see. About 50 minutes. No installation. No account. Your code is compiled in your browser.

Start module 1
Course interest

Help shape what we build next

Tell us what you want to learn. This records your interest; it does not enroll you or promise a launch email.

We use your address to identify duplicate responses and your note to decide what to build next.