next up previous
Next: Assigning Pointers Up: Pointers Previous: Pointers

Simple Pointers


int *pointer;
int i = 10;

pointer = &i; // address of i
cout << i << endl;
cout << *pointer << endl; // "dereferencing"

cout << pointer << endl; //?? what happens?


Andreas Koeller
2000-06-04