Okay we have created a reference to Date So, that any change made in Date via this function
So, that the changes may reflect in main
but why do we make change if we hade declared it const ?
What's benifit of using const
ostream& operator<<(ostream& os, const Date& d){
return os << '(' << d.year()
<< ',' << d.month()
<< ',' << d.day() << ')';
}
source : Programming : Principles and structure ```