hi, I've this simple problem with "thinking in c++" page 476; the examples seems wrong or not completely and compiler gets an errror:
What's wrong?Code:
class HowMany2 { std::string name; public: std::string getName() const ; }; //main.cpp std::string (HowMany2::*fp)() const = &HowMany2::getName(); //compiler require a static method int main() { fp = &HowMany2::getName(); }