Doing a linked-list of function pointers
Hi all -
I'm wanting to do a linked-list of function pointers. The functions will have different return types and different numbers of arguments.
I'm unsure as to whether this is even possible.
What I need is basically a generic "function-pointer signature" in the bit of code below.
It would probably use "void *" but more than that I don't know.
Code:
/* Create a linked-list of function pointers. */
typedef struct fp {
void * funcptr; /* This is where I'm stuck. */
struct fp *next;
} fp_list;
Many thanks in advance for your help!
- Andy