What you are trying to do is cast from “void (*)(int, int, ip*, void*)” to “void (*)()”. In C, you used a cast to “void *” as a crutch (i.e., instead of casting to “void (*)()”, you casted to the most general case (“void *”), and decided to let the compiler handle the cast to “void (*)()”). In C++, implicit casts from type “void *” are not allowed (one of the subtle differences — this is why you must make explicit casts when using malloc in C++).
What I think you want to do is:
Code:
nids_params.syslog = (void (*)())nids_new_syslog;