C++ / Basic

C++ β€” Basic

Build C++20 programs with initialized values, validated control flow, and owning value types.

6 lessons Β· No account required

What you will learn

  • Compile complete examples and predict defined outputs.
  • Design functions and small classes with explicit contracts.
  1. Build and understand a C++20 program

    Follow source text through compilation and linking, then distinguish a reproducible result from a diagnostic or an unsupported feature.

    Start learning
  2. Values, types, and safe initialization

    Choose representations deliberately, initialize every local value, and reason about arithmetic without assuming a particular machine layout.

    Start learning
  3. Control flow and validated input

    Turn requirements into branches and loops with explicit boundaries, then keep invalid input from entering your calculation.

    Start learning
  4. Functions, references, and contracts

    Express a calculation as a small interface, choose how arguments cross it, and prevent references from outliving the objects they identify.

    Start learning
  5. Strings, vectors, and valid access

    Use owning standard containers for text and sequences, and reason about indices, iteration, and invalidation before accessing their elements.

    Start learning
  6. Classes, invariants, and composition

    Build a small value type that starts valid, exposes meaningful operations, and keeps related state consistent through construction and use.

    Start learning
Back to course