Reading data from file into array
<p>I am trying to read specific data from a file into two 2D arrays. The first line of data defines the size of each array so when I fill the first Array i need to skip that line. After skipping the first line, the first array fills with data from the file until the 7th line in the file. The second array is filled with the rest of the data from the file. </p>

<p>Here's a labeled image of my data file:
<img src="http://i.stack.imgur.com/CSU6v.png" alt="enter image description here"></p>

<p>and here's my (flawed) code so far:</p>

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

using namespace std;

int main()
{
    ifstream inFile;
    int FC_Row, FC_Col, EconRow, EconCol, seat;

    inFile.open("Airplane.txt");

    inFile &gt;&gt; FC_Row &gt;&gt; FC_Col &gt;&gt; EconRow &gt;&gt; EconCol;

    int firstClass[FC_Row][FC_Col];
    int economyClass[EconRow][EconCol];

    // thanks junjanes
    for (int a = 0; a &lt; FC_Row; a++)
        for (int b = 0; b &lt; FC_Col; b++)
            inFile &gt;&gt; firstClass[a][b] ;

    for (int c = 0; c &lt; EconRow; c++)
        for (int d = 0; d &lt; EconCol; d++)
            inFile &gt;&gt; economyClass[c][d] ;

    system("PAUSE");
    return EXIT_SUCCESS;
}
</code></pre>

<p>Thanks for the input everyone.</p>
