当前位置: 技术问答>linux和unix
请问一个目录流的问题
来源: 互联网 发布时间:2016-02-05
本文导语: 这个语句typedef int(*filter)(const struct dirent *);定义是什么意思啊?谢谢 | 生成新的函数指针类型filter, 即表示: int abc(const struct dirent *) { } . . . struct dirent a; filter fun; fun = abc; //调用 (*fun...
这个语句typedef int(*filter)(const struct dirent *);定义是什么意思啊?谢谢
|
生成新的函数指针类型filter, 即表示:
int abc(const struct dirent *)
{
}
.
.
.
struct dirent a;
filter fun;
fun = abc;
//调用
(*fun)(&a); //等于abc(&a)
.
.
.
谨参考
int abc(const struct dirent *)
{
}
.
.
.
struct dirent a;
filter fun;
fun = abc;
//调用
(*fun)(&a); //等于abc(&a)
.
.
.
谨参考