If you want to declare the function pointer, you can use the typedef command to produce a type that is a function pointer type, such as following (refer to the ortp package)
include/ortp/ortp.h
typedef void (*OrtpLogFunc)(OrtpLogLevel lev, const char *fmt, va_list args);
The following is another case which I have been ever used.
typedef void (* CALLBACK) (int);
沒有留言:
張貼留言