My program keeps a text file list of co-ordinates, for example:
3,5
2,7
12,9
5,6
... and so on, indefinitely.
How do I read the values from the nth line into variables X,Y - say if I specific the 3rd line, then X=12 and Y=9?
Also, how can I search the text file to check if a specific co-ordinate pair is already in the list?
3,5
2,7
12,9
5,6
... and so on, indefinitely.
How do I read the values from the nth line into variables X,Y - say if I specific the 3rd line, then X=12 and Y=9?
Also, how can I search the text file to check if a specific co-ordinate pair is already in the list?
Comment