Topic notebook
C++
What this topic covers This C++ topic is arranged like a simple learning path. Each page builds on the page before it, so you can move from "what does a C++ program look like?" to...
What this topic covers This C++ topic is arranged like a simple learning path. Each page builds on the page before it, so you can move from "what does a C++ program look like?" to...
Core idea C++ programs are built from a few repeated pieces: headers, a main function, statements, and basic input or output. Once that shape feels familiar, the rest of the langua...
Core idea Variables store data, and data types tell C++ what kind of value each variable can hold. This is the first step toward writing programs that actually work with informatio...
Core idea Control flow decides which part of the program runs. This is how programs react to different situations. Main tools if runs code when a condition is true. else runs when...
Core idea Loops repeat a block of code, which saves you from writing the same instruction again and again. Common loop types for is useful when you know how many times to repeat. w...
Core idea Functions let you group code into reusable pieces. This makes programs easier to read, test, and update. Function example Revision points A function can take inputs calle...
Core idea Arrays store multiple values of the same type, and strings store text. These are useful once you already understand variables, conditions, loops, and functions. Array exa...
Core idea In modern C++, ownership should be explicit. This page is intentionally later in the sequence because memory management concepts make much more sense after the basic lang...