W
wongjoekmeu
Hello All,
I know that when you pass an argument to a function (if you want let
the
function be able to change the value) then you can choose to pass the
argument by reference or a pointer to that argument.
Now my question is, why would you prefer to let a function return a
reference or a pointer ???
Consider the following with operator overloading. I suppose the
operator can be seen as a function (right ?)
type operator - ()
type& operator - ()
Thanks for explaining this.
Robert
I know that when you pass an argument to a function (if you want let
the
function be able to change the value) then you can choose to pass the
argument by reference or a pointer to that argument.
Now my question is, why would you prefer to let a function return a
reference or a pointer ???
Consider the following with operator overloading. I suppose the
operator can be seen as a function (right ?)
type operator - ()
type& operator - ()
Thanks for explaining this.
Robert