awesome. thanks.
Thanks, Tyler Littlefield http://tysdomain.com ----- Original Message ----- From: Tamas Marki To: [email protected] Sent: Thursday, January 15, 2009 1:30 AM Subject: Re: [c-prog] operator overloading:what to return? On Thu, Jan 15, 2009 at 5:13 AM, Tyler Littlefield <[email protected]> wrote: > wesome, thanks. > why the & in the function definition? does that just return a reference? Yes, more precisely a const reference. In C++ it's good practice to make all immutable parameters const references - it avoids the copying of the variable object (if you omit the & you'll get a local copy of the variable), and the const forbids you from modifying the original value. -- Tamas Marki __________ NOD32 3767 (20090115) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com [Non-text portions of this message have been removed]
