i line 44 and 45 why do we use this-> it can also be done as
book(string n, int p){
name=n;
price=p;
}
what is this-> ??
What is this->?
we use . (dot operator) to access data from class object simillarly we use
-> to access the data of pointer
i mean what is “this->” ??
this is pointer referring to current class
so this -> means accessing member of current class
ohhh … thank u bhai
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.