From: Andres R. <and...@ho...> - 2002-02-14 04:42:58
|
We're trying to re-make my vector library, right this time, with = overloaded functions. Now when I'm returning, I want to return a = reference right? so that I can chain my addition/subtraction etc.? But = now for some functions I don't actually want to change the values of = *this, I want to return a temporary vector I created in the operator+() = function for example. Can I return temp as a reference without problems = of it going out of scope? What's the best way of doing what I'm trying = to do? |