I was reading a book on C++ and there was an example where they passed by reference a constant to a function.
int square(const int& n)
...
I can't see the point of this? Why not just pass it normally by value if you are not going to be making any changes to the variable. Isn't the whole point of passing by reference so you can change the value of a variable.