|Synopsis:||Pass arguments of non-simple types by reference or pointer|
Passing classes or structures by value is often costly because copies are made. So use references or pointers. Use the const keyword if the object is not allowed to change.
If there is a choice, prefer references over pointers to pass function arguments. The function can safely assume that ? as ever, in a conforming C++ program passing a reference is always bound to an object. If a pointer is passed, however, the function must be prepared to accept a NULL pointer.
Also see [INT#022].