+ 6
I don't understand the 'this' function?
Will anyone help me?
6 odpowiedzi
+ 10
it refers to the object itself. because sometimes you dont know for example what was clicked so you can use only one method for many objects with different names or id
+ 6
We can call it compiler pointer and it point on current active object
+ 2
Thanks!
+ 2
very helpful answers. thanks guys! is self used in c++ too or is it just this?
0
The this pointer is basically an implicit argument when calling a non-static method. It simplifies the synthax.
0
It is also used for calling an object local variables.
For example:
https://code.sololearn.com/clhLD96GS0AP/?ref=app