C++: understanding pointers

Example:

int x = 10;
int* ptr = &x;
Pointers in C++ store the address of another variable.

Solution:

cout << *ptr;  // Outputs: 10

Beginner's Guide to C++