Hi everyone,
I have a simple setback in my program. I'm not the best way to go about doing this. I'm trying to do it in the simplest way possible. I have an input file that looks like this
2.5 600 -2
10 20 30
I want to sort each line using my own sort algorithm, but I want to work on one line at a time, storing the numbers in a vector. I think one solution is to use getline and put it into a strstream and maybe extract the values one at a time from the stream. This way I can separate it by lines. The problem is I want to IN the float values, so I don't know how to test for a newline if I'm using something (psuedo-code) like cin >> int x
Any ideas?