What does ‘return *this’ mean in C++?

this means pointer to the object, so *this is an object. So you are returning an object ie, *this returns a reference to the object.

Leave a Comment