我遇到以下代码:
int H3I_hook(int (*progress_fn)(int*), int *id)
{
...
}
我不明白(int*)
第一个论点结尾的目的?
揭开神秘面纱:
int (*progress_fn)(int*)
可以解释如下:
int (*progress_fn)(int*)
^ ^ ^
| | |___________ pointer to integer as argument
| |
| pointer to any function that has V and takes ^
|
|__________________________return type an integer
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句