pointers c++

Declare a pointer variable:

int* myPointer;

Assign the address of a variable to the pointer:

int myVariable = 10;
myPointer = &myVariable;

Access the value via the pointer:

int value = *myPointer;