1
我有以下代码:如何初始化指向函数的指针数组?
typedef int (*t_Function) (int x);
t_Function Functions[MAX_FUNCTIONS];
int f(int x)
{
return 0;
}
但我不能正确初始化。如果我添加以下行:
Functions[0] = f;
那么编译器会生成以下错误:
prog.c:217: warning: data definition has no type or storage class
prog.c:217: error: conflicting types for Functions
如何初始化数组函数指针?
是的,我已经找到它了。我在一个函数中做。谢谢! – psihodelia 2011-03-04 10:06:30