Public feed #889278

lalala

public text v1 · immutable
Raw Edit
·published 2008-02-02 20:39 UTC
rendered paste body
CVector CVector::operator+ (const CVector& c)
{
  CVector a; // new object to compute result

  // compute result based on current object and it's left neighbor (argument)
  result.setValue(this->value + b.getValue()); // example only!

  // return result
  return result;
}

will do it for:
CVector a, b, c;
...
a = b + c;