Pointers and References in C++

A typical way to lay out program memory.

Pointers (variables that contain a memory address) are a topic you will never have dealt with in a course based on a language like Python, thus they may be a hard concept to grasp. Nevertheless, they are fundamental to computer programming: you just never dealt with them in Python because Python hides their existence from the Python programmer... not deceitfully, but because it easier to program without having to think about memory addresses. But the people who create the Python language have to deal with pointers all the time. And you will never be a top-notch professional, even programming in a language that hides its pointers from you, unless you understand their use.

Here are the topics we will cover in this unit:


Source code illustrating pointers and memory management: