Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 参数名遗漏错误?_C_Arrays_Function_Methods - Fatal编程技术网

C 参数名遗漏错误?

C 参数名遗漏错误?,c,arrays,function,methods,C,Arrays,Function,Methods,尝试调用该方法时出错: int box(int rows, int cols, int [rows][cols]) 从使用此调用的主方法: box(arrayDimensions, arrayDimensions, array); 但我不确定问题出在哪里 谢谢 int box(int rows, int cols, int [rows][cols]) 需要 int box(int rows, int cols, int something[rows][cols]) 记住,在函数定义/头中

尝试调用该方法时出错:

int box(int rows, int cols, int [rows][cols])
从使用此调用的主方法:

box(arrayDimensions, arrayDimensions, array);
但我不确定问题出在哪里

谢谢

int box(int rows, int cols, int [rows][cols])
需要

int box(int rows, int cols, int something[rows][cols])

记住,在函数定义/头中使用的每个变量都需要有一个标识符/名称。与其他任何东西一样,您使用的数组需要有一个标识符/名称,因为它是一个变量@AkshaiShah对您的代码进行了很好的修改。

您遇到了什么错误?你能给我们看一段我们可以试用的代码吗?还有,什么是
int[rows][cols]
?也许
int-box(int-rows,int-cols,int-ARRAY[rows][cols])
?@JosephQuinsey我本来想用
YourArrayVariableNameGoesher
,但这一叫喊似乎很公平