I'm trying to understand operators overloading, in the tutorial i use there is an example of overloading "+" operator for adding two objects.
Box operator+(const Box& b)
{
Box box;
box.length = this->length + b.length;
box.breadth = this->breadth + b.breadth;
box.height = this->height + b.height;
return box;
}
why does the parameter needs to be const reference to object?