I program a Shell.
I have different functions with different parameters.
void func1(void);
void func2(char * x,);
void func3(char * x, string y);
At the moment a use a map to store string and pointer.
typedef map<string,void (*)()> t_list;
map<string,void(*)()>::iterator it;
t_list list;
list["argument1"]=&func1;
to find and start the function i use that:
it=list.find("argument");
if(it != list.end())
{
if->second();
}
Is it possible to store all functions with different parameters in the map? And how?