I want to do something like this code:
myType a;
a->foo();
void foo()
{
cout << a->bar();
}
void bar()
{
cout << a->bar2();
}
void bar2()
{
cout << a->bar3();
}
In another word, when a member function is called, can we use the original caller?
You want:
Or, more simply
This IBM C++ documentation explains it pretty well. Have a look.