C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 35)
35.
Which of the following ways are legal to access a class data member using this pointer?
this->x
this.x
*this.x
*this-x
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
12 comments Page 2 of 2.

Rahul chaudhary said:   1 decade ago
What is the legal way to access class data member using this pointer in Java?

Sai said:   1 decade ago
The most common reason for using the this keyword is because a field is shadowed by a method or constructor parameter.


Post your comments here:

Your comments will be displayed after verification.