I am passing the array ary into the function fillArray and am getting a "No matching function for call to.." error at the point where I call the function inside of main().
To my knowledge, from what I've been taught and from my textbook, the syntax is correct. Any idea why I am getting this error?
Ok, I understand why that needs to be 100. And the fillArray function wasn't really how it was supposed to be, I just had something thrown in there until I started working with it. A new problem that I have now: I have written a function that takes any two rows in an array, adds them together, and stores the result in the second row.
The code:
1 2 3 4 5 6 7 8 9 10 11 12 13
//Function to add any two rows and store the result in the second row.
void addRows(int ary[][100], int &ROWS, int &COLS)
{
int r1, r2;
cout << "Enter the number corresponding to the rows you wish to add: " << endl;
cout << "First Row: ";
cin >> r1;
cout << "Second Row: ";
cin >> r2;
for(int c=0; c < COLS; c++)
ary[r2][c] = ary[r1][c] + ary[r2][c];
}