GeeksforGeeks » C/C++ Programming Questions
C++ this pointer
(2 posts)-
When do we have to use this pointer explicitly in our programs?
-
Example 1:
class base {
int value;public:
void set_value(int value)
{
this->value = value;
}
};Example 2:
Object&
Object::func (){
{
// Some processing
return *this;
}~Ashish
Reply
You must log in to post.