次のコードでは:
class foo
{
public:
void foo_function() {};
};
class bar
{
public:
foo foo_member;
void bar_function(foo bar::*p_foo)
{
// what is the corrct sintax for following:
this->*p_foo->foo_function(); // expression must have a pointer type??
}
};
int main()
{
foo foo_obj;
bar bar_obj;
typedef foo bar::*p_foo;
p_foo blah = &bar::foo_member;
bar_obj.bar_function(blah);
return 0;
}
bar::bar_functionを機能させるための正しい構文は何ですか?