read to end of line problem
I'm kicking myself because this isn't working. Basically, I need to read a bunch of numbers from an input file to an array and sort them. My problem is, I'm supposed to stop at the end of the line, sort that array, then read another line, sort that, and so on. I'm having trouble getting the loop to stop inputing at the end of the line. Using chars, I can get it to recognize the end of line character ('\n'), but using integers this doesn't work. Any ideas? My input text is listed below to give you an idea of what I'm talking about:
data.txt:
9132574
8742323523498723648
23423
21342354324523467