10

I am getting an error when trying to call the method:

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

from the main method using this call:

box(arrayDimensions, arrayDimensions, array);

But i am not sure what the problem is.

Thanks.

AkshaiShah
  • 5,739
  • 11
  • 37
  • 45

2 Answers2

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

needs to be

int box(int rows, int cols, int something[rows][cols])
Minion91
  • 1,911
  • 12
  • 19
1

Remember, every variable that you use in the function definition/header needs to have an identifier/name. Like anything else, the array you use needs to have an identifier/name, since it is a variable @AkshaiShah modified your code pretty nicely.

SpirosMesa
  • 69
  • 1
  • 1
  • 10