#include <iostream>
class A{
//data members
public:
void foo()
{
std::cout << "In foo\n";
bar();
}
void bar()
{
std::cout << "In bar - cheers!\n";
}
};//end of class A
int main()
{
A a;
a.foo();
return 0;
}
======
$ g++ foo.cpp
$ ./a.out
In foo
In bar - cheers!
Either you didn't try this simple test, or your attempt to paraphrase the problem completely missed out the real problem you're having.