Meaning of line with "if"

Hello!
Please, what is the exact meaning of the line 20?

as b-> is a:
if ( a.?)

isitme(a) it returns "true".

so:

if (a.true) meaning : if it is true that "true" is memeber belonging to object a , then cout ....

but, "true" in a.true is not the member, but its value, isn't it?

as it goes for function, not ususal variable, can someon ehelp m eout from this mess?

Many thanks!!!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;

class Dummy {
  public:
    bool isitme (Dummy& param);
};

bool Dummy::isitme (Dummy& param)
{
  if (&param == 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;
}
Well line 20 just returns 0?


as far as line 18 basically it checks to see if the object pointed to by b(a) is equal to a and if so output
yes, &a is b
Topic archived. No new replies allowed.