numbers present in an array : <p>i have a text file containing several lines of real numbers, I should count how many numbers are present in each line. My idea is to insert with a for loop each row inside an array of unknown size. But I don't know how to count how many numbers are present in each array per line of text. How could I do it? Thanks</p>

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

using namespace std;
int main(){
  ifstream in("input.txt");
  ofstream out("output.txt");
  for(int i=0; i&lt;100; i++){
     double* vec= new doule[n];
     for(int j=0; j&lt;n; j++)
        in &gt;&gt; vec[j];
  }
}
</code></pre>
