#include <iostream>
using namespace std;
class Dummy {
public:
bool isitme (Dummy& param);
};
bool Dummy::isitme (Dummy& param)
{
if (¶m == this) return true;
else return false;
}
int main () {
Dummy a;
Dummy* b = &a;
if ( b->isitme(a) )
cout << "yes, &a is b\n";
return 0;
}
I was looking at this C++ example and I don't understand why bool isitme (Dummy& param);
uses the dereferencing sign '&'. The argument is an Dummy object itself right, why it is the object's address?