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.

Sagar H Y said:   2 years ago
We have used the arrow operator (- >) for access the class data members using pointer.

Harsh said:   1 month ago
-> operator is used for accessing the pointer type.

But *this.x can also be used as we are de-refencing it?


Post your comments here:

Your comments will be displayed after verification.