evilrix.com
C++ Passing by value vs. passing by reference
In C++ all arguments are passed to functions by value. In other words, a copy of the value is taken and that is what the function has to work with. If you want to modify the original value you must…