title: load float/double matrix from txt using c++
body: <p>It seems pretty dumb, but I am having a hard time loading a matrix type <code>double</code> I have on a txt file. inside  it has signed <code>double</code>s things like </p>
  
  <pre><code>11707.2 -919.303 -322.04 2260.71 2443.85 -4629.31 3082.64 -4209.86
  -1741.71 298.192 -5658.34 2377.03 -3039 -2049.99 2788 -1915.9 
  </code></pre>
  
  <p>and so on, and I have it in a txt file. </p>
  
  <p>I have used <code>fscanf</code>, <code>ifstream</code> and all sorts of things I have found and am familiar with, but I have not been able to load it. I found on related question but the procedure didnt help me.</p>
  
  <p>I need to save those values to a float array, but right now I just want to be able to load them correctly, all values look like the ones I wrote.</p>
  
  <p>help please? any one?</p>
  
  <p>Related question: <a href="https://stackoverflow.com/questions/7151922/reading-a-txt-text-file-in-c-containing-float-separated-by-space">Reading a .txt text file in C containing float, separated by space</a></p>