title: read one line with integers c++
body: <p>i am making an algorithm and i need to read a whole line full of integers in c++<br>
  my input file is :
  <br />
  //////
  <br>
  5
  <br>
  6 3 4 2 5
  <br>
  //////
  <br>
  i want to read the second line and take the integers one by one<br>
  I don't want to take the integers to a variable because i have a memory limit(64 mb of ram)<br>
  i want to take the integers directly from the file<br>
  is there any way to do it in c++(not c)<br>
  <br>
  i have tried this<br></p>
  
  <pre><code>fstream file;
  file.open("file.txt");
  int a;
  file &gt;&gt; a;
  </code></pre>
  
  <p>But with this i can make it only read the "5" and if i use something like "getline();" i can't get each integer as i want<br>
  Thanks</p>