When I try to pass the sales array to the function, I get this: error
C2664: 'printArray' : cannot convert parameter 1 from 'int [4][5]' to 'int'
Here's the array and call:
int sales[4][5], row, column;
for (row = 0; row < 4; row++)
{
for (column = 0; column < 5; column++)
{
cin >> sales[row][column];
}
}
printArray(sales);
and here's the function:
void printArray(int A[4][5])
{
for(int R=0;R<4;R++)
{
for(int C=0;C<5;C++)
cout<<setw(10)<<A[R][C];
cout<<endl;
}
}
Thanks in advance.