Tyler Littlefield wrote:
> wesome, thanks.
> why the & in the function definition? does that just return a reference?
> 
> 
> Thanks,
> Tyler Littlefield
> http://tysdomain.com
> 
>   ----- Original Message ----- 
>   From: Thomas Hruska 
>   To: [email protected] 
>   Sent: Wednesday, January 14, 2009 9:12 PM
>   Subject: Re: [c-prog] operator overloading:what to return?
> 
> 
>   LList<T> &operator+=(const T &val)

Pass by reference.  Instead of copying the entire structure and passing 
that, the pointer is passed around.  Dereferencing a pointer becomes an 
implied action instead of having to explicitly dereference it - among 
other useful things.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to