Map Of functions c++
问题 I have made a map of functions. all these functions are void and receive single string parameter. code: void f1(string params){...} void f2(string params){...} void f3(string params){...} map<string , void*> funcMap; funcMap["f1"] =(void*)&f1; funcMap["f2"] =(void*)&f2; funcMap["f3"] =(void*)&f3; how do i call a function? I tried the next code, but id doesn't work: void (*func)(string) = &funcMap[commandType]; func(commandParam); I get this error message: Server.cpp:160:46: error: cannot