How do I use Reference Parameters in C++?
Think of a reference as an alias. When you invoke something on a reference, you’re really invoking it on the object to which the reference refers. int i; int& j = i; // j is an alias to i j = 5; // same as i = 5 When it comes to functions, consider: void … Read more