Also, the first one, passing by reference, ensures that a value is actually passed in. The second one, passing by pointer, allows the user to pass in a null pointer.
So if you Addition is not supposed to destroy the parameters and it does not expect a null pointer, then there is no need to pass by pointer.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.