I'd like to read in a simple row of integers from a .txt file and sort the numbers into an int array. The numbers are separated by space characters, like this:
1 2 3 4 5 6 7 8 9 10
Now, there's where I'm a bit stuck: I'm not sure how to cut up the data by the space characters and put them to the [i]th element of the int array. I was thinking about reading in the data into a string and cut them up by finding the space characters, as I have numbers above 9, with two digits - and going through the string with a for loop caused my numbers to get cut up by only signle digits.