Next tool: Object References
If you program in C, you know what a pointer is.
The value of the variable p is the memory address of the variable i.
i is the same as *p (dereference pointer).
*p means “take the value of the memory location where p points to”.
now you can call the variable by either name.
A reference is something only available in C++
This is a bit like an equivalence statement in Fortran:
This can be confusing. Read as “give the variable i a second name”.
Object references are important because they are a very efficient way to pass objects as parameters.