December 1998
Intermediate to advanced
624 pages
13h 8m
English
Assignment operators should generally return *this by reference. This means that they adhere to the same convention used by the built-in types by allowing assignment to be used as an expression rather than simply as a statement. This allows assignment to be cascaded into larger expressions. An example follows.

Nothing, unless the programmer who developed the class failed to implement the assignment operator correctly.
Assigning an object to itself is called self-assignment.
No one intentionally ...
Read now
Unlock full access