Pointer allows you to dereference a memory address. A reference is the physical memory address variable.
If you have a variable and you want to pass-by-reference, making any changes to the original variable effect the originally allocated value.
You use a pointer for instance if you want to dereference a physical memory address as part of an array of allocated memory addresses.
// reference example
int value = 0;
int value1 = &value;
value1 = 2;
// value should equal 2
// pointer example
int value[5] = {1,2,3,4,5};
*value += 1;value++;
*value += 1;value++;
*value += 1;value++;
*value += 1;value++;
*value += 1;
// should now be {2,3,4,5,6}
If you have a variable and you want to pass-by-reference, making any changes to the original variable effect the originally allocated value.
You use a pointer for instance if you want to dereference a physical memory address as part of an array of allocated memory addresses.