What does ‘&’ do in a C++ declaration?
The “&” denotes a reference instead of a pointer to an object (In your case a constant reference). The advantage of having a function such as over is that in the former case you are guaranteed that myname is non-null, since C++ does not allow NULL references. Since you are passing by reference, the object … Read more