Is the parameter name omitted?

I get an error when trying to call a method:

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

from the main method using this call:

 box(arrayDimensions, arrayDimensions, array); 

But I'm not sure what the problem is.

Thanks.

+6
source share
2 answers
 int box(int rows, int cols, int [rows][cols]) 

should be

 int box(int rows, int cols, int something[rows][cols]) 
+13
source

Remember that each variable used in the function definition / header must have an identifier / name. Like everything else, the array you use must have an identifier / name, as this @AkshaiShah variable changed your code very well.

+1
source

Source: https://habr.com/ru/post/928011/


All Articles