Hey so i am trying to figure out how i pass a function pointer to a function stored within a struct. The following is the typedef
struct menu_item
{
char name[ITEM_NAME_LEN+1];
BOOLEAN (*func)(struct vm*);
};
The function i am trying to pass has the following prototype.
void print_list(struct vm_node *root);
with the defintion of the file being:
void print_list(struct vm_node *root) {
while (root) {
printf("%s",root->data->id);
root = root->next;
}
printf("\n");
}