+ 1
Use of this operator
this
6 Answers
+ 1
this keyword is used to access current class members. the program shows how this and super works. hope it helps.
https://code.sololearn.com/cDoKCF1uyaI6/?ref=app
+ 3
What is your question exactly?
+ 2
class A {
private:
int a;
public:
A (int a){
// the object's variable is now equal to the paramater given
this->a=a;
}
};
+ 1
this refers to as in this class. example you made a variable called $hi in user class.
this->$hi. thats in php
+ 1
points to the current class. you dont use this out side of a class
0
Is this pointer a object .....that is used to point the other object ?