A pointer is a piece of data (stored) that tells where to find (the address) a different piece of data.
I still don’t understand the different between a reference and a pointer.
A pointer is a piece of data (stored) that tells where to find (the address) a different piece of data.
I still don’t understand the different between a reference and a pointer.
Pointers can be reused as long as they point to the same type, but references are only to a single object. Basically pointers are valid for operations, reassignment, and functions as parameters. References are for passing the location of data to functions as an argument and being returned by functions to be stored in a pointer.