I'm trying to create a template function which calls a member function of a class.
template<typename T>
void call(T owner, void (T::*func)())
{
(owner.func());
}
and the usage:
Foo a;
call(a, &Foo::printname);
But the compiler returns error C2664. What's the problem?