Question:
For a reference counted implementation, how is the operator+=
member function coded? The function receives
(const String & rhs)and returns
String &
. The returned String &
String &Answer: operator+=
should follow all the rules of operator = .
,i.e. it should not return a new string.