How to populate an array of function pointers from an existing task-list Macro?
The Task List looks like this:
#define execute_list \
printhello(); \
printbye();
printhello and printbye are existing functions.
We need to populate the array of function pointers with the address of these functions.
void (*my_fptr_array[])(void) =
{
&printhello,
&printbye,
};
This should happen automatically through a Macro. Something like:
void (*my_fptr_array[])(void) =
{
EXTRACT_FUNCTION(0,execute_list),
EXTRACT_FUNCTION(1,execute_list)
};
is this possible in C?