Basically what I'm trying to do is take coordinate data from a txt file and assign variables to them so I can later calculate distances between those coordinates and a set location (whose data is constant). The txt file looks something like this:
45.75 21.98
23.55 61.23
88.21 25.71
etc.
Each row is a set of coordinates with a space between latitude and longitude. I need to store each latitude and longitude separately. I have no clue how to do this, as I'm just getting started with c++. If it helps, the txt file is named "CoordinateData.txt."
Any help would be much appreciated.
it doesn't say how to do this!!!!!!!
Really??????????? I'm guesing the below code was just for show. Check the comments I made for you and start coding.
Actually Tertius, it does NOT say how to do that. I'm not asking how to print out the results of the txt, as you kindly copy and pasted for me, but to assign variables to that data so I could later perform arithmetic on it.