hi, I've this simple problem with "thinking in c++" page 476; the examples seems wrong or not completely and compiler gets an errror:
Qt Code:
  1. class HowMany2 {
  2. std::string name;
  3. public:
  4. std::string getName() const ;
  5. };
  6. //main.cpp
  7. std::string (HowMany2::*fp)() const = &HowMany2::getName(); //compiler require a static method
  8. int main() {
  9. fp = &HowMany2::getName();
  10. }
To copy to clipboard, switch view to plain text mode 
What's wrong?