- pointer can be re-assigned.
- pointer variable has its own identity: a distinct, visible memory address that can be taken with the unary & operator and a certain amount of space that can be measured with the sizeof operator.
- it is possible to create a pointer to a pointer, but not a pointer to a reference or reference to reference(will collapse).
- it is possible to create an array of pointers, but not an array of references.
- pointer can be assigned
nullptr, whereas a reference must be bound to an existing object. - pointer needs to be dereferenced with
*to access the object it points to, whereas a reference can be used directly. A pointer to a class/struct uses->to access its members whereas a reference uses a.. - const reference and rvalue reference can be bound to temporaries. pointers cannot.
const int &x = int(12); // legal C++
int *y = &int(12); // illegal to take the address of a temporary.