+ 1

Today i found new about "This"??? Reference variable

1.-->This is a reference variable of a class type which is declared as a parameters(local variable) in each instance function available in class.. 2.-->now we see the eq... where we access the data member of a class without this reference variable... see code now understand the concept..when we call the function by apply reference id(.)our complie pass it reference as a parameters https://code.sololearn.com/c6GTlO047aA7/?ref=app

3rd Apr 2018, 6:39 PM
Arun Tomar
Arun Tomar - avatar
2 Réponses
+ 2
sorry... now i correct it.. see the code By mistake it done.. and Thanks for pointing out
3rd Apr 2018, 6:56 PM
Arun Tomar
Arun Tomar - avatar
+ 1
x is a local variable and not instance variable, so t.x is wrong. PS: I got what you are trying, to simulate "this".
3rd Apr 2018, 6:53 PM
Nikhil Sharma
Nikhil Sharma - avatar