Chapter 11. References
FAQ 11.01 What is a reference?
A reference is an alias, an alternate name for an object. References are frequently used for passing parameters by reference (pass-by-reference; see FAQ 2.09). In the following example, function
swap() receives its parameters by non-
const reference since it needs to change the values of the caller's actual parameters, in this case
y become aliases for
j, respectively. The effect is similar to the C-style pass-by-pointer, but without the caller having to take the address of the parameters and without the callee having to dereference pointers. That ...