Hi,
This is my first post in daniweb!
I've two questions:
First question:
I'm currently studying about classes, and could get '=' overloading format:
T& T::operator =(const T& b);
Why we set it to return reference? what's the use?
Why couldn't simply be:
void T::operator =(const T& b);
I've used it and worked fine. So why they keep return a reference in almost every example I've seen about '=' overloading, even in Wikipedia!
---
Second question is: What's the point of returning a reference in functions? What's the use?
---
Thank you in advance!