A common error amongst new C++ programmers is to have operator= return void, a decision that seems reasonable unTIL you realize it prevents chains of assignment.
Here is an example implementation:
A common error amongst new C++ programmers is to have operator= return void, a decision that seems reasonable unTIL you realize it prevents chains of assignment.
Here is an example implementation: