Hi, I have been struggling to understand the purpose of references.
It seems that a reference is just a mixture of a pointer and an actual object.
So the question is, in which scenario and why in a function you would prefer to take as a parameter:
-
a reference -for example the function signature would look like void my_func(int& a)
-
an actual object - function signature would look like void my_func(int a)