<分区>
typedef long (*GuiFunc) (int, int, int, unsigned short*, long, long);
请帮我理解上面这行代码
<分区>
typedef long (*GuiFunc) (int, int, int, unsigned short*, long, long);
请帮我理解上面这行代码
最佳答案
typedef long (*GuiFunc) (int, int, int, unsigned short*, long, long);
定义新类型 GuiFunc
。它可以声明一个函数指针,它接受 6 个参数 int, int, int, unsigned short*, long, long
和 returns长
。
假设你有这样一个函数
long foo(int, int, int, unsigned short*, long, long)
{
}
如果你声明
Guifunc callback; //declare a varaible of type Guifunc
callback=foo;
然后你可以像这样调用 foo 函数 long x=callback(6parameters);
关于c - 请解释下面的一段代码。我是初学者所以请帮助我理解,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19250189/