quick question about the this function

class CDummy {
public:
int isitme (CDummy& param);
};


int isitme (CDummy& param);
so is this function is meant to take in the class(CDummy)'s object which is a pointer to any member of the class CDummy??
It is meant to take an instance of CDummy and check to see if it is the same instance, a totally stupid function
in C++. The implementation would be:

1
2
3
4
// Function should return bool, not int, and take parameter by const reference instead
bool isitme( const CDummy& param ) {
return &param == this;
}


ah i see...i was just wondering whats it really meant to do n is it really taking in a class's instance, thats all...
Topic archived. No new replies allowed.