That's pretty close:
Code:
Scene& Scene::operator+=(Scene const& param)
{
return *this = *this + param;
}
By passing param in by reference, you're prefering pass-by-reference to pass-by-value (see Effective C++, Item 22.) By making that reference a const one, you're using const whenever possible (see Effective C++, Item 21.) which greatly contributes to being const correct (see
http://www.parashift.com/c++-faq-lit...rrectness.html.)
This assumes that you have operator+ for Scenes defined which actually takes care of the addition.
Lyle