这个 C 语句是什么意思? [英] What does this C statement mean?

查看:37
本文介绍了这个 C 语句是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了这条线:

void (*(*x)(void (*[10])(int *)))(int *)

谁能告诉我它是什么?

推荐答案

要自己解决这个问题,请从最里面的括号开始,然后解决问题.

To break this down yourself, start from the inner most parentheses and work your way out.

  1. (*[10]) <---- 10 个指针的数组
  2. (*[10])(int *) <------ 10 个指向函数的指针的数组,其中包含一个指向 int 的指针作为其参数
  3. (void (*[10])(int *)) <------ 10 个指向函数的指针数组,其中包含一个指向 int 的指针作为它的参数并返回 void
  4. (*x)(void (*[10])(int *)) <------- x 是一个函数指针它有一个参数(一个由 10 个指向函数的指针组成的数组,它有一个指向 int 的指针作为参数并返回 void)
  1. (*[10]) <---- Array of 10 pointers
  2. (*[10])(int *) <------ Array of 10 pointers to functions which has a pointer to int as its argument
  3. (void (*[10])(int *)) <------ Array of 10 pointers to functions which has a pointer to int as its argument and returns void
  4. (*x)(void (*[10])(int *)) <------- x is a pointer to a function which has as an argument (an array of 10 pointers to functions which has a pointer to int as its argument and returns void)

.....

我中途停了下来,但希望这会有所帮助.

I stopped partway through, but hopefully that helps.

这篇关于这个 C 语句是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆