basically its part of a bigger program but its this bit that doesn't work.
its supposed to read the numbers from a txt file (datafile) and write them to an array (fromfile)
the datafile looks like...