开发者

void (*a)(char*, char*); is this a function?

 void  (*a)(char*, cha开发者_如何学Pythonr*);

is this a function called a. returns void pointer? in c?


This is a function pointer named a. The function signature of a is a function that returns void and takes two char * arguments.

See Function Pointer Tutorials for more information on function pointers.


It's a pointer to a function, which takes 2x char pointers & returns void (see cdecl.org)


It is a function pointer. Example:

void someFunction(char* param1, char* param2) {
   // ...
}

int main(int argc, char* argv[]) {
   char arg1[] = "Hello";
   char arg2[] = "World";
   void (*a)(char*, char*) = &someFunction;
   a(arg1, arg2);
   return 0;
}


This is declaration of a variable named a; it is a pointer to a function that takes two char* parameters and does not return anything. You will need to assign an actual function to a before calling it.


It's a variable which is a pointer to a function returning nothing, which takes two arguments of type "pointer to char". The function pointer is named "a".


No.

It is a pointer to a function that takes two strings and returns nothing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜