In a method of an object of type class A
, I handle an object of class B
that has a public method .join(*A)
.
I want my object of type A
calling this someObjectOfTypeB.join(*A)
method, to use a pointer to itself as the parameter.
void A::someMethod()
{
B b();
b.join(I want to a to use a pointer to itself as a parameter);
}
A a();
a.someMethod();
Upon further investigation, this
was not the problem as I led myself to believe; and is indeed the correct way of doing what I wanted to do.