Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parameter name omitted error?

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.

like image 621
AkshaiShah Avatar asked Oct 18 '12 08:10

AkshaiShah


2 Answers

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

needs to be

int box(int rows, int cols, int something[rows][cols])
like image 112
Minion91 Avatar answered Nov 13 '22 12:11

Minion91


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.

like image 41
SpirosMesa Avatar answered Nov 13 '22 13:11

SpirosMesa