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