Unable to pass array by reference correctly
<p>I'm trying to add two rows of my array together in a function and its not doing it and I can't tell why its not as the code looks right and doesn't error out.  I have tried using a * and &amp; to pass it by reference but I always get code errors.  Thanks</p>

<pre><code>#include &lt;iomanip&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;

using namespace std;

void addRow(int arr[100][100], int firstrow,int secondrow,int rows, int cols);

void addRow(int arr[100][100], int firstrow,int secondrow,int rows, int cols){
    int i =0;
    int j = cols;
    while(i&lt;rows){
        arr[secondrow][j]+=arr[firstrow][j];
        i++;
        j++;
    }
    print(arr,rows,cols);
}
</code></pre>
