Filling 2-D arrays from user input
<p>I have a bit of a problem, I am writing a program to ask the user to enter numbers for a Sudoku grid, and then store them in a 2-d array. I know how to print out the array to show the Sudoku grid, But I am having trouble getting the array elements set to the numbers that the user enters, can anyone help? </p>

<p>This is all that I have, which I know is not much but I have only ever done this with 1-d arrays before.</p>

<p>Code:</p>

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

using namespace std;

void fillGrid1(int grid1, int sizeOfArray) {
    for(int x = 0; x &lt; sizeOfArray; x++) {
        grid1[x][9] = x;
    }
}

int main()
{
    int grid1[9][9];
    fillGrid1(grid1, 9);

    for(int row = 0; row &lt; 9; row++) {
        for(int column = 0; column &lt; 9; column++) {
            cout &lt;&lt; grid1[row][column] &lt;&lt; " ";
        }

        cout &lt;&lt; endl;
    }
}
</code></pre>
