title: While not new line
body: <p>if i have a file like</p>
  
  <pre><code>1 5 6 9 7 1 
  2 5 4 3 8 9
  3 4 3 2 1 6
  4 1 3 6 5 4
  </code></pre>
  
  <p>and i want to sort the numbers in every line ..
  how to know when there is a newline ?
  code for example : </p>
  
  <pre><code>while (!input.eof) {
      input&gt;&gt;num;
      while (not new line ?){
      input&gt;&gt;o;
      b.push_back(o);
      }
      sort (b.begin(),b.end());
      se=b.size();
      output&lt;&lt;num&lt;&lt;" "&lt;&lt;b[se-1]&lt;&lt;endl;
      b.clear();
  }
  </code></pre>
  
  <p>Note: i tried while(input>>num) and getline will now work with me
  any ideas ?</p>