converting a string to a function name

Hi
is there a way to convert a string to a function name and fire it. like
void his_fun(){
cout << "his is here" << endl;
}
vector<string> vec;
vec.push_back("his");
vec.push_back("me");
for(i=0; i

Hi! C++ does not support it directly. But you can use OS native System Calls. For example Windows features: GetProcAddress API function. The problem here is with C++ name mangling. You must know the mangled function name. With Kind Regards, Ovanes Markarian On Thu, November 9, 2006 09:18, Fred J. wrote:
Hi
is there a way to convert a string to a function name and fire it. like void his_fun(){ cout << "his is here" << endl; }
vector<string> vec; vec.push_back("his"); vec.push_back("me");
for(i=0; i
is so, how?
what whole idea is to avoid typing vector
vec; vec.push_back( &func_1 ); vec.push_back( &func_n ); ... thanks --------------------------------- Everyone is raving about the all-new Yahoo! Mail._______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Fred J.
-
Ovanes Markarian