Calling a member function pointer stored in a std map
问题 I'm storing a map in a class that has strings as keys and pointers to member functions as values. I'm having trouble calling the right function throw the function pointer. Here is the code: #include <iostream> #include <string> #include <map> using namespace std; class Preprocessor; typedef void (Preprocessor::*function)(); class Preprocessor { public: Preprocessor(); ~Preprocessor(); void processing(const string before_processing); private: void take_new_key(); map<string, function> srch