I was wondering why, when you overload an operator, does it have private member access? I know it does, but why? for example:
Why can that be done? does it have to do with *this?Code:Class Date ... public: void operator=(Date&); ... private: int day,month,year; ... void Date::operator=(Date& x) { day=x.day; month=x.month; year=x.year; }



LinkBack URL
About LinkBacks


