I'm learning C++ with previous Java experience.I found the following example in the cplusplus.com :
int CDummy::isitme (CDummy& param)
{
if (¶m == this)
{
return true; //ampersand sign on left side??
}
else
{
return false;
}
}
My question is : Why does it return boolean false
when I clearly declared the method as int
? It's never possible in Java.
The link of the example is : here.