1// A pointer in c++ is a variable whose value is a memory address.
2
3int main() {
4 int x; // 'regular' int
5 int *y; // 'pointer-to-an-int
6
7 x = 5; // assign x some value which is an integer
8 y = &x; // use the address-of operator to get the address of x;
9 // store that value as the value of y.
10 return 0;
11}