Passing by Reference
Passing by Reference
- Declare the function argument as a pointer to the desired type.
- When passing a variable, precede it by the & operator, which extracts the address of the variable.
- Reference the variable through the pointer.
- Use this to avoid copying massive structures to the argument stack.