In C what's the function pointer (void*) doing in:
int (*fn) (void*)
If the parameter is nothing then it should be:
int (*fn) ()
My understanding is void* is chunk of memory. void* mem means mem pointing to a chunk of memory. But what's (void*) without a name?
void foo()doesn't mean a function with no parameters; unlike,it's means a function with undefined number of arguments. So,a call like this is valid totally:foo(1,"abc",2.3). If you want to specific a function with 0 argument,you need to usevoidbetween()like this:void foo(void).