Justified the use of static in my case?

I have a class. In this class I have the functionality of handling user commands. Your "bash" for example..
And now I have a question. In the class I have a private std::map, this map consists of a pair .
Also have CommandListener method that takes a string from the user. Then this method looks for the key match of the string and if found, executes the value tobish method.
std::map<std::string, void(*)()> Functions = {
 {"SomeF1", SomeF1},
 {"SomeF2", SomeF2},
 {"SomeF3", SomeF3},
 {"SomeF4", SomeF4},
 // ...

void Client::CommandListener(std::string Command)
 std::map<std::string, void(*)()>::iterator it = Functions.find(Command);
 if (it == Functions.end()) std::cout << "This command does not exist\n";
 else it->second();

But! The problem is that the map refuses to accept the non-STATIC methods! Ie SomeF1 (and the rest) I had to declare static, and the only way to work.
I did it purely by accident, and now my decision.. Well to me it seems spike =(

Tell me how best to proceed in my case?
Thank you!
March 25th 20 at 13:42
1 answer
March 25th 20 at 13:44
Tell me how best to proceed in my case?

To know what static class methods differ from conventional methods.
To know that in addition to the function pointers are pointers to member functions.
To understand how this is better to use in your case.
About the pointers did not know! Thank you!
I'll dig. - yolanda_Okuneva commented on March 25th 20 at 13:47
Well, thank you, really earned...
Long could not understand why did not work record it->second()
In the end had to do so (*(this).*(it->second))()
Uzhos... - yolanda_Okuneva commented on March 25th 20 at 13:50

@yolanda_Okuneva, you can record a little prettier: (this->*it->second)(); - marcus57 commented on March 25th 20 at 13:53

Find more questions by tags C++OOP