That´s not possible in C/C++. Using a std::map storing string/fn pointers pairs might be a solution, but you have to fill the map on your own. You also need a separate map for each function type...