The Address Operator, &
int *example_ptr;
int i = 42;
example_ptr = &i;
cout << i << endl;
cout << *example_ptr << endl;
* is used to dereference example_ptr, i.e. to get the value of the variable it points to.
Previous slide
Next slide
Back to first slide
View graphic version