I may be completely missing something here, but I'm trying to figure out how to read in floating-point numbers from a file (multiple lines of floats,) then sort the individual lines and output them to another file in sorted order, still separated by line. The sorting isn't a problem for me, but there's no end of line notification, correct? The only thing I could think of to do was to read it in as a string using getline and then try to convert it back with istringstream, but when I did this, it only worked for the first line of data. Any help would be greatly appreciated.
Input file example data:
1 4 3 2 9.5 8.2 120 <------ want to read in individual lines
3 5 22.0 4.4 86 <-------
99 33.6 388 11 31.5 <--------