function pointer question
I have a question on function pointers.
The name of the function cannot be known a priori, since it is supplied at runtime when my program opens a file and retrieves the name of the function to call.
The external file will have something like this:
FUNCTION_NAME = 'SomeFunc'
I open that file and read the attribute storing it as a string:
the above is set to the string value extracted from the file.
The function pointer is defined as:
void (*fp) (int *);
one input argument to the function.
How can I initialize the function pointer? Can I just do this?
void (*fp) (int *) = tmpFunc.c_str()
Thanks for the kind help.