7.1.1 Pointers

In this lesson, you are going to explore a key concept in C++, pointers. A Pointer is simply a variable that holds a memory address. While the idea of a variable is found in languages like Java and Python, having direct access to them in a pointer variable gives C++ a lot more flexibility.

Why use pointers? Pointers provide shared access to common data, allow you to build flexible, dynamic data structures, and precisely control allocation/deallocation of memory.

In concept, you will find pointers to be relatively straightforward, however their applications can get complicated making them prone to errors and hard to debug.

Last updated