What is this pointer in C
The eduladder is a community of students, teachers and programmers just interested to make you to pass any exams. So we solve previous year question papers for you.
See Our team
Wondering how we keep quality?
Got unsolved questions?

Ask Questions

Use Me  ?

New searches
06cs44-Object-oriented-programming-with-c-->View question

What is this pointer in C++.

Describe it.

By:mmodi1995

Taged users:
|metaphor|Akhil-Raj

Likes:
|prabhat2346

Dislikes:
Be first to dislike this question
Talk about thisDelete|Like|Dislike|


Answers

The this pointer is a pointer accessible only within the non-static member functions of a class, struct, or union type. It points to the object for which the member function is called. Static member functions do not have a this pointer.

Example:

void Date::setMonth( int mn )
{
month = mn; // These statements
this->month = mn; // are equivalent
}


thegdx

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------

Can you help us to add better answer here? Please see this



Not the answer you're looking for? Browse other questions from this Question paper or ask your own question.

Eduladder magazine is out there subscribe!