Programming foundations

Stage 1 of 6 · 8 lessons · ~4 months

Your first language

Learn modern C++ properly: types, control flow, functions, references, std::vector and std::string, and how compiling works. C++ shows you what the machine is doing, which makes it slower to learn and very rewarding.

Start: Compiling, linking and warnings

Lessons· one lesson for each topic, in this order

  1. 1Compiling, linking and warnings
  2. 2Types, variables and input
  3. 3Conditionals and loops
  4. 4Functions and references
  5. 5std::vector, std::string and std::map
  6. 6Reading files and parsing input
  7. 7Header files and multiple source files
  8. 8Undefined behaviour and debugging

Start with

  • CourseFree
    LearnCpp.com

    LearnCpp.com · Beginner

    Free, current and careful: chapters 0 to 16 take you from setup to references and std::vector

Practise

  • Small exercises in your language track, with free feedback from a human mentor

Keep handy

  • The standard library reference: check std::vector and std::string pages as you use them

  • Quick syntax lookups and an online compiler for testing a snippet on a shared computer

Before moving on: Write a 200-line C++ command-line program, such as a quiz or a budget tracker, split across two source files, using std::vector, std::map and file input, compiled with warnings on (-Wall -Wextra) and no warnings left.

Tauseef's advice
Learn modern C++ (C++17 or later) from learncpp and ignore old tutorials full of raw new, delete and char arrays. Always compile with warnings on and read the first error, not the last one.

Mark this stage as not done?