I’m currently working on code which utilizes an external library and here is part of what is given in the library:
typedef void (*func_start_t) (void *);
extern int create(func_start_t func, void *a);
I’m trying to call this with the following line of code (where foo is another function):
create(func_start_t foo, *args);
However I keep getting an erro expected primary-expression before foo. What am I doing wrong?
You are doing something wrong. The
func_start_tin the call to the function is totally unnecessary (and incorrect). You should just write: