Foundations — const correctness — const variables, const pointers, const member functions
This is the foundations page for the parent topic. Before we can read a monster like const int* const p, we must earn every symbol in it, from absolute zero. We go slowly. Nothing is assumed.
0. What is a "variable" really? (the box picture)
Before const can mean anything, we need to see what it modifies.

Look at the figure: the grey rectangle is the box, the word age floating above is the name, and the 10 inside is the value. Two separate things live here — the name and the value it currently holds. Keep that split in your head; const is a promise about one of these two things, and half of all confusion comes from not knowing which.
1. The symbol = — assignment, not equality
int x = 10;— make a box namedx, and in the same breath store10. This first store is called initialization (giving a box its very first value).x = 20;— a later assignment, overwriting the box.
Test yourself now:
Initialization vs assignment — which happens in int y = 5;?
And in a following line y = 7;?
2. The word const — a one-way valve

In the figure, an ordinary variable has a two-way arrow (read ↔ write). Adding const snaps a valve shut: the write arrow is crossed out in chalk-pink, only the read arrow (chalk-blue) survives. That is literally all const does — it deletes the write direction.
3. Types: int, double, char — the shape of the box
We need types now because const is written fused onto a type: const int, const char. The const and the int together describe one box: "a whole-number box that is read-only." Where you place const relative to the type is exactly what we decode in Section 6. See constexpr and compile-time evaluation for the stricter cousin of const that must be known while the program is still being compiled.
4. The & symbol — "address of"
To understand pointers (Section 5) we first need the idea of a memory address.

In the figure, boxes are drawn as houses on a street; the number under each house is its address. &age hands you the street number of the age house, not the person living there. Prerequisite reading: Pointers and References in C++.
5. The * symbol — two totally different jobs
This symbol confuses beginners because it wears two hats. We separate them here so Section 6 is clean.

Read the figure left to right: box p holds the number 1000 (an address). The chalk-blue arrow labelled *p walks from p to house 1000 and reads the 10 living there. So a pointer is a box holding a house-number, and * is the act of walking to that house.
6. Reading const with pointers — right-to-left
Now every symbol is earned, we can decode the parent's table. The rule:
Walk each case slowly, right-to-left:
Map this back to the two-box picture (Section 5): const before * freezes the far box (pointee); const after * freezes the near box (the pointer). This exact skill powers Function parameters — pass by value vs const reference, where a const& parameter says "I read your data, I won't wreck it."
7. class, this, and member functions
The last piece the parent needs: what const means after a function.
Prerequisite map
Each foundation feeds the next: boxes and assignment let us define the const valve; addresses let us define pointers; pointers plus the valve give the right-to-left reading; classes plus the valve give const methods. Together they become the full topic.
Equipment checklist
Cover the right side and test yourself. If any line is shaky, re-read its section.
A variable is...
The difference between initialization and assignment
What const deletes
Why a const variable must be initialized immediately
What &x gives you
x, not its value.The two jobs of *
Why pointers make const ambiguous
const could freeze either.const int* p freezes...
*p = ...), but the pointer can be repointed.int* const p freezes...
What this is inside a method
What const after a method does to this
const ClassName*, making all members read-only inside.Which methods a const object can call
const member functions.