Getting data from TXT file...
This is the TXT file:
NORTH-SOUTH road
2 4 6 8 0 3 5 7 9 8 6 4 2 -4 -6 -8 -2 0 -6 -8 -3 1 3 5 7 0 0 11 8 4 1 -3 2 9 4 6 2 0 -7 -9 -5 -4 -2 3 8 7 1 -9 -5 -3 -8 -9 1 3 5 7 9 12 13 7 5 2 0 -2 -999
WEST-EAST road
3 5 7 0 0 11 8 4 1 -3 2 2 0 -7 -9 -5 -4 -2 3 8 7 1 -9 -5 9 8 6 4 -2 0 -6 -8 -3 1 3 5 7 0 0 14 8 4 1 -3 2 6 4 2 -4 -6 -8 -2 0 -6 -8 -999
I need to input the integers only into two arrays, let's call them RoadNS[?] and RoadWE[?].
When it reads the file it should 'skip' the letters 'NORTH-SOUTH road', input the integers {2, 4, 6, 8, 0.....} into array RoadNS[?], terminate when it sees the first '-999', then again 'skip' the letters 'WEST-EAST road', input the rest of the integers {3, 5, 7, 0, ......} into array RoadWE[?], and terminate at '-999'.
My problem is that I don't know how to skip the letters, then resume and start inputing the integers into an array, then terminate at -999 and again skip the letters and input the rest of the integers...
I CAN ONLY USE SIMPLE ARRAYS, FOR LOOPS, DO/WHILE LOOPS, FUNCTIONS AND CLASSES. NO SPECIAL ARRAYS ETC, I'M ONLY A BEGINNER ;)
Please help