I simply didn't understand any thing .....please help my
Post a Reply
|Oldest Newest Rating|
· September 10, 2016
put simply, it's a keyword that refers to the current object that you are working with
· September 14, 2016
Every function that is defined within a class has a pointer called 'this'. (except for static function members that are part of the class, not part of any object).
The this pointer is used to identify the members of a specified object, for example obj1 has a function named try(), when you refer to data members of the class within this functions, the compiler should know for which object your referring to, so when u use a data member like 'unicorn' the compiler knows that you're referring to the unicorn data member of obj1 through the this pointer.
Used in many types of software including music players, video games, and many large scale applications.
|Bucky Roberts Administrator|