作者:海之蓝水之清清2011 | 来源:互联网 | 2023-05-17 17:36
IamcurrentlystudyingformyC-MidtermandIencounteredthisdeclaration:我目前正在为我的C-Midterm学习,我遇到
I am currently studying for my C-Midterm and I encountered this declaration:
我目前正在为我的C-Midterm学习,我遇到了这个声明:
int **foo[][]()
When looking for the solution as to what this declaration means my tutors actually gave two different answers: 1) foo is an array of arrays of functions with return type pointer to pointer to an int 2) foo is an array of arrays of pointers to pointers to a function with return type int I know the "start with the name of the variable, continue to the right until you reach the end or ')' then go back to your last starting point and continue to the left until you reach the start or '('" rule so I think 1) is the correct answer here but I am not entirely sure.
当寻找关于这个声明意味着什么的解决方案时,我的导师实际上给出了两个不同的答案:1)foo是一个函数数组的数组,返回类型指向指向int的指针2)foo是一个指针数组的数组到返回类型为int的函数我知道“以变量的名称开头,继续向右直到你到达终点或')'然后返回到你的最后一个起始点并继续向左,直到你到达开始或者'('“规则,所以我认为1)是正确的答案,但我不完全确定。
Thanks, Ozelotl
2 个解决方案