I am trying to understand what the following typedefs mean. Are they function pointers?
typedef int Myfunc(char *);
static Myfunc myfunc;
int myfunc(char *string)
{
printf("%s\n", string);
return 0;
}
I know typedef int Myfunc(char *) means func Myfunc return an integer,that’s all,all right? And I thought, next statement, how could call myfunc? It should be this way static Myfunc *myfunc, mean a function pointer,isn’t it?
To call
myfuncis the same as a function call: