🚀 Alguni Start learning

🚀 C++ for kids

C++ is C with the sharp edges filed off, and the language most games are built in. Streams, string, vector, class, constructors and destructors, inheritance and virtual functions.

Start the C++ track

How this track is kept honest

The same interpreter runs C++, checked against g++ on thousands of programs from an outside compiler test suite. The details easiest to fake are pinned hardest: destructor order, dynamic dispatch, and what sizeof really reports.

Best after the C track — it assumes you have already met pointers.

How it starts

In C you had to match %d to the right value by hand. C++ gives you cout and the << arrows instead — it works out the type for you. endl ends the line.

The full C++ syllabus

8 units and 33 lessons, in the order they are played. Each unit has a page of its own with every explanation in it, the code samples and what they print, and a few questions to try.

Unit 1: Hello, C++

The friendlier cousin

  1. cout
  2. Real Booleans
  3. Strings At Last
  4. Greeting Machine

Unit 2: Choices, Loops & Vectors

Lists that can grow

  1. If / Else
  2. Loops
  3. Vectors
  4. Game Builder

Unit 3: Functions & References

Two names for one thing

  1. Making Functions
  2. Copies and Originals
  3. Handy Extras
  4. Function Factory

Unit 4: Text, Grids & Input

Build something real

  1. String Tools
  2. Walking Through Text
  3. Vector Tools
  4. Grids & Asking the User
  5. Quiz Machine

Unit 5: Structs & Enums

Grouping things that belong together

  1. Grouping Values
  2. Structs That Do Things
  3. Named Numbers
  4. Struct Master

Unit 6: Classes & Objects

Blueprints that look after themselves

  1. From Struct to Class
  2. Constructors
  3. Keeping Data Safe
  4. Class Master

Unit 7: Inheritance

Building a class from another

  1. Passing Things Down
  2. Changing What You Inherited
  3. Inheritance Master

Unit 8: More Tools

Overloading, memory and mistakes

  1. One Name, Several Functions
  2. Asking for Memory
  3. When Things Go Wrong
  4. Handy Library Tools
  5. Toolkit Master

Other things to learn

Start learning — units 1–2 are free