file processing in C++
<p>I'm wondering if anybody can help me solving the following problem in C++:</p>

<p>I have a file where some time there is missing data i.e there are two consecutive TABs, then I need to transform the second TAB into "-999999" or "0" for example.
here is how the file looks like</p>

<pre><code>     i_1   i_2   i_3   i_4   i_5
j_1  12          14          16
j_2        11    17    25  
j_3  44                51    65
</code></pre>

<p>I want to compute the mean of the elements on the first row i.e( 12,14 and 16) as:</p>

<pre><code>sum+=tab[i][j];
mean = sum/5; (considering empty spaces =0)
</code></pre>

<p>thank you</p>
