Le_Forgeron <jgr### [at] free fr> wrote:
> Vector & operator +(const Vector &v2) const
> {
> return Vector(
> this.internal_storage[0]+v2.internal_storage[0],
> this.internal_storage[1]+v2.internal_storage[1],
> this.internal_storage[2]+v2.internal_storage[2] );
> }
You are returning a reference to a temporary. Kaboom.
--
- Warp
Post a reply to this message
|