2

Possible Duplicate:
Overloading assignment operator in C++
C++ why the assignment operator should return a const ref in order to avoid (a=b)=c

Why do most books recommend that the assignment operator return a refernce to this? Why not a const reference?

const will make strange code like (a=b)=c not compile which is a good thing.

1

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.