>small(*array[], &sumc, &sumr, r, h, w);
The empty subscript only works for declarations. Either remove [], or remove * and change [] to [0]. Also, &sumc and &sumr are pointers, not int as small expects. This will compile, but it may not do what you want because you clearly have issues with the difference between single and multi-dimensional arrays:
small(array[0], sumc, sumr, r, h, w);
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Okay, first, make sure that your function declaration and defintion match (copy/paste is useful). As it is, your declaration says that the last two parameters are references while the definition says that the second and third parameters are references and the last two are simple integers. Second, you only need to use the ampersand in a function call when the function expects a pointer:
// Declaration and definition types must match. Parameter names
// don't matter, but they can be useful documentation
void small(int array[10][10],int &sumc,int &sumr,int r,int h, int w);
void small(int array[10][10],int &sumc,int &sumr,int r,int h, int w)
{
}
small(array, sumc, sumr, r, h, w); // This will compile now
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401