Practice mode C++

Which C++ keyword is a pointer to the object for which a member function is called?

Correct answer C. this

Explanation

Inside a non-static member function, this is a pointer to the calling object, so this->x refers to that particular object's member x.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.