I have the following classes:
class A { public: B* b; } class B { public: double operator()(double val); } Then at some point I try to call class B as a function through a pointer to class A :
a->b(val); //a - указатель на экземпляр класса A When I compile, I get the error:
error: 'A::b' cannot be used as a function Question: how to fix it? Those. How to use pointer functors?
(a->b)(val)- the same thing - Andrei KurulevB, not justBArrow dereference onlya. No compiler at hand, no way to check. - D-side(*(a->b))(val). Thank. - Andrey Kurulev