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
