How do you pass a function of a class as a parameter to another function of the same class
问题 i basically want to use a dif function to extract a different element of a class (ac). the code is similar to this: .h: class MyClass { public: double f1(AnotherClass &); void MyClass::f0(AnotherClass & ac, double(MyClass::*f1)(AnotherClass &)); }; .cc: double MyClass::f1(AnotherClass & ac) { return ac.value; } void MyClass::f0(AnotherClass & ac, double(MyClass::*f1)(AnotherClass &)) { std::cout << f1(ac); } didn't work, it gives error#547 "nonstandard form for taking the address of a member