How do I forward declare a function that has a function as a parameter in C?
Here is the function:
void start_thread (void* function (void*)) {
...
}
I tried forward declaring it as:
void start_thread (void*);
as well as:
void start_thread (void* (void*));
and:
void start_thread (void*, void*);
None of these were accepted. What is the correct day to forward declare for this function?
Edit:
void start_thread (void (*) (void*));
Yields:
Compilation error
prog.c: At top level:
prog.c:135:6: error: conflicting types for 'start_thread'
void start_thread (void* function (void*)) {
^
prog.c:25:6: note: previous declaration of 'start_thread' was here
void start_thread (void (*) (void *));
^