title: How to read numbers from an ASCII file (C++)
body: <p>I need to read in data files which look like this:</p>
  
  <pre><code>* SZA: 10.00
   2.648  2.648  2.648  2.648  2.648  2.648  2.648  2.649  2.650  2.650
   2.652  2.653  2.652  2.653  2.654  2.654  2.654  2.654  2.654  2.654
   2.654  2.654  2.654  2.655  2.656  2.656  2.657  2.657  2.657  2.656
   2.656  2.655  2.655  2.653  2.653  2.653  2.654  2.658  2.669  2.669
   2.667  2.666  2.666  2.664  2.663  2.663  2.663  2.662  2.663  2.663
   2.663  2.663  2.663  2.663  2.662  2.660  2.656  2.657  2.657  2.657
   2.654  2.653  2.652  2.651  2.648  2.647  2.646  2.642  2.641  2.637
   2.636  2.636  2.634  2.635  2.635  2.635  2.635  2.634  2.633  2.633
   2.633  2.634  2.634  2.635  2.637  2.638  2.637  2.639  2.640  2.640
   2.639  2.640  2.640  2.639  2.639  2.638  2.640  2.640  2.638  2.639
   2.638  2.638  2.638  2.638  2.637  2.637  2.637  2.634  2.635  2.636
   2.637  2.639  2.641  2.641  2.643  2.643  2.643  2.642  2.643  2.642
   2.641  2.642  2.642  2.643  2.645  2.645  2.645  2.645
  </code></pre>
  
  <p>What would be the most elegant way to read this file into an array of floats? </p>
  
  <p>I know how to read each single line into a string, and I know how to convert the string to float using <code>atof()</code>. But how do I do the rest the easiest? </p>
  
  <p>I've heard about string buffers, might this help me?</p>