THIS Begginners Skype Chat - BSC

there is something like a function - this (something with class pointers)
Can i just simply avoid using it? I don't really like it,I don't know why :D

1
2
3
4
5
 void Date::setMonth( int mn ) {
  month = mn;            // These three statements
  this->month = mn;      // are equivalent
  (*this).month = mn;
}




What about c++ begginners skype chat? Add me in skype mantasxxl3
Normally you can avoid it unless you have a parameter that has the same name as class member data. Data shadowing will require you to use this to refer to the class member instead of the parameter.
Topic archived. No new replies allowed.