Glossary

Every new word from the lessons, in plain language. Click a lesson link to read it in context.

#

& (ampersand) has two jobs

In a type (int& r), & means reference. In front of a variable (&x), it means address of. Same symbol, different jobs.

From 9.2 — References: another name for the same box →

A

auto

auto tells C++ "work out the type for me". Here it becomes std::string.

From 8.2 — Going through a list →

B

breakpoint

A breakpoint is a stop sign on a line. Click in the margin next to a line number (a red dot appears). Then start with debugging (F5 in most IDEs).

From 7.5 — Using a debugger →

Bug

A mistake in a program that makes it act wrongly. Finding and fixing bugs is called debugging.

From 7.1 — Two kinds of errors →

C

Calling convention

The agreed rules for where arguments go and where the return value comes back. On Linux and Mac (the "System V" rules), integer arguments go in rdi, rsi, rdx, rcx, r8, r9. On Windows, they go in rcx, rdx, r8, r9. Both return values in rax / eax.

From 13.4 — Functions in assembly →

class

A class is like a struct, but it also holds functions that work on its data. These are called member functions.

From 10.3 — Classes: objects with behaviour →

Code

The steps of a program, written in a language the computer tool can understand. Writing code is also called programming or coding.

From 0.2 — What is a program? →

comment

A comment is a note in your code. The computer ignores it completely.

From 1.3 — Comments →

compile error

A compile error means the compiler can't understand your code. The program won't even be built.

From 7.1 — Two kinds of errors →

Compiler

A tool that reads your C++ code and turns it into a program your computer can run. It also tells you when your code has mistakes.

From 0.4 — Compiling: turning code into a program →

Conditional operator (? :)

condition ? a : b is a tiny if/else that gives a value: "if condition, then a, otherwise b". It is called the conditional operator.

From 6.6 — Same name, different inputs (overloading) →

constructor

A constructor is a special member function that runs automatically when an object is created. It has the same name as the class and no return type.

From 10.4 — Constructors: setting up an object →

crackme

A crackme is a small program that asks for a secret, made on purpose to be reversed. Let's make our own and crack it in three levels.

From 13.8 — Project: make and crack your own crackme →

D

debugger

A debugger lets you pause your program and look inside it while it runs. It's like a slow-motion replay.

From 7.5 — Using a debugger →

Declaration vs definition

A declaration says a thing exists (its name and type). A definition also includes the body — the actual steps.

From 6.5 — Declare before you use →

Decompiler

A tool that tries to turn assembly back into C-like source code. It can't bring back your original names or comments, but it's much faster to read than raw assembly.

From 13.7 — Your reverse engineering toolbox →

E

Encapsulation

Hiding an object's data and only allowing access through its functions. It keeps objects in a valid state and lets you change the inside later without breaking other code.

From 10.5 — Keeping data safe (encapsulation) →

Executable format

The layout rules for program files. Windows uses PE (Portable Executable). Linux uses ELF. Macs use Mach-O. The ideas are the same.

From 13.2 — From C++ to a program file →

expression

An expression is anything that makes a value. 2 + 3 is an expression. So is age * 12.

From 1.9 — Simple math →

F

function

A function is a group of steps with a name. You write it once, then use it as many times as you like.

From 6.1 — What is a function? →

I

IDE

Short for Integrated Development Environment. An app that puts an editor, compiler and debugger together in one place. Visual Studio and CLion are IDEs.

From 0.5 — Setting up your tools →

L

lambda

A lambda is a function with no name, written right where you need it (11.2 — The algorithm toolbox).

From 12.3 — Lambdas in depth →

logic error

A logic error means your code runs, but does the wrong thing. The compiler can't catch it, because the code is "correct C++" — it is just not what you meant.

From 7.1 — Two kinds of errors →

M

magic number

A magic number is a number in the code with no explanation.

From 2.7 — Values that never change (const) →

O

Object

In C++, a piece of memory that holds a value is called an object. A variable is simply an object with a name.

From 1.4 — Variables: a labeled box →

P

parameter

The parameter is the box in the function (name). The argument is the value you send in when calling ("Ana").

From 6.3 — Inputs: parameters →

Parameter vs argument

The parameter is the box in the function (name). The argument is the value you send in when calling ("Ana").

From 6.3 — Inputs: parameters →

pointer

A pointer is a variable that holds an address. It's like a note that says where a box is.

From 9.4 — Pointers: a note with an address →

program

A program is a list of steps that a computer follows. In order. One at a time.

From 0.2 — What is a program? →

R

reference

A reference is a second name for an existing variable. Not a copy — the same box.

From 9.2 — References: another name for the same box →

Rubber duck debugging

Explaining your code to an object (like a rubber duck) line by line. Saying it out loud makes you notice what you skipped over in your head.

From 7.6 — When you're stuck, do this →

S

Standard

The official rule book for C++. Each new version (C++11, C++17, C++20...) is called a standard.

From 0.3 — What is C++? →

statement

A statement is one step in your program. It is like one sentence.

From 1.1 — Statements and the main function →

std::jthread

A thread that automatically waits ("joins") for its work to finish when it goes away (C++20). The older std::thread needs you to call .join() yourself.

From 12.6 — Intro to multithreading →

Syntax

The grammar rules of a language. A syntax error means you broke a rule, like forgetting a ; or a }. The compiler will tell you.

From 1.1 — Statements and the main function →

U

Undefined behavior

When a program does something the rules do not allow — like using a variable that has no value — anything can happen. It might work, crash, or act strangely. This is called undefined behavior.

From 1.7 — Uninitialized variables →

V

variable

A variable is a box in memory that holds a value. It has a name so you can use it later.

From 1.4 — Variables: a labeled box →

vtable

A hidden table of function addresses that a class with virtual functions uses to decide, while running, which version of a function to call.

From 13.6 — Structs and classes in memory →

W

warning

A warning is not an error. The program still builds. But warnings often point at real bugs.

From 7.2 — Reading an error message →

X

XOR

A bit operation (^ in C++). Doing x ^ key scrambles a byte, and doing ^ key again un-scrambles it. Simple to use, but also simple to undo once you spot it.

From 13.8 — Project: make and crack your own crackme →