Module 02 of 10

Language Fundamentals

Lessons

About This Module

C++ is statically typed: every variable has a type that the compiler knows ahead of time, and that type decides how much memory it uses and what you can do with it. This module covers the core building blocks you will use in every program, starting with variables and types and the functions that let you reuse code instead of copying and pasting it.

The second half tackles the two features that set C++ apart from most languages: pointers, which are variables that hold a memory address, and references, which act as another name for an existing variable. Understanding how they differ — and when to use each — is the key to reading and writing real C++ code.

Watch the lessons in order, then continue on to Memory & RAII.

Lessons

4 videos
01

Variables in C++

How C++ stores data: the built-in types, their sizes in memory, and how to declare and use variables.

02

Functions in C++

Why to wrap repeated code in functions, how to pass inputs and return outputs, and what a function call costs.

03

POINTERS in C++

What a pointer really is — a memory address stored in a variable — and how to declare, dereference, and use one.

04

REFERENCES in C++

How references work as an alias for an existing variable, how they differ from pointers, and how to pass arguments by reference.