Count columns in TXT with C++? : <p>I have these types of data in txt files.</p>

<pre><code>1   3   4   5
2   4   5   2
3   5   7   8
2   5   7   8
</code></pre>

<p>or even </p>

<pre><code>1 3 4 5
2 4 5 2
3 5 7 8
2 5 7 8
</code></pre>

<p>Separated with TABs, with one space or exported from excel. 
I need a function to count columns, that returns an int, how can I do this?</p>

<p>Thanks!</p>
