eg:
base a;
base b (parameter);
both have the same member functions so how to differentiate between these two objects.given that a test core of
a.somefunction(b);
in this case somefunction(cons &x) where we can simply say x is b. but how to indicate a?
i tried this method but it didnt work.
the error says cannot convert 'this' pointer from 'const base' to 'base &'
Expand|Select|Wrap|Line Numbers
- if (this->somefunct() == x.somefunction() ){
- do something;
- }