Storing values from file into array and extract values based on certain number
<p>file.txt</p>

<pre><code>0 00 19
0 200 699
0 7000 8499
0 85000 89999
0 900000 949999
0 9500000 9999999
1 00 09
1 100 399
1 4000 5499
1 55000 86979
1 869800 998999
1 9990000 9999999
2 00 19
2 200 349
2 35000 39999
2 495 699
2 7000 8399
2 84000 89999
2 900000 949999
2 9500000 9999999
3 00 02
3 030 033
3 0340 0369
3 03700 03999
3 04 19
3 200 699
3 7000 8499
3 85000 89999
3 900000 949999
3 9500000 9999999
</code></pre>

<p>Assuming I only want the block where the first value is <code>3</code>, how can I store only the following into three separate arrays:</p>

<pre><code>3 00 02
3 030 033
3 0340 0369
3 03700 03999
3 04 19
3 200 699
3 7000 8499
3 85000 89999
3 900000 949999
3 9500000 9999999  
</code></pre>

<p>I have so far:</p>

<pre><code>while (finished != EOF){
    finished = fscanf(fp,"%d %s %s\n", &amp;areaScanned, &amp;pubLow, &amp;pubHigh);
}
</code></pre>

<p>That works fine but it stores the entire list. How can I narrow it down? Basically what I need to do is check if a certain number falls between a value on row 1, between column 1 and column 2, then row 2, value between col1 and col2, then row3, value between col1 and col2 etc.</p>
