I have an array of function pointers, for example:
void (*aCallback[10])( void *pPointer );
I assign functions to an array as follows:
aCallback[0] = func_run;
aCallback[1] = func_go;
aCallback[2] = func_fly;
Names like "run", "go", "fly" are stored in another array. Is it possible to assign functions to a function array using char? Sort of:
char sCallbackName[64];
sprintf(sCallbackName, "func_%s", "run");
aCallback[0] = sCallbackName;
Thanks for the help.
source
share