What are Pointers?
In this lesson, we will explain the concept of pointers in C++. This will be crucial in our understanding of OOP.
We'll cover the following
Definition
A pointer holds the address of an object stored in memory. The pointer then simply “points” to the object.
The type of the object must correspond with the type of the pointer.
Declaration
A basic pointer can be declared using the following template:
type *name; // points to a value of the specified type
Get hands-on with 1400+ tech skills courses.