Hi i'm really new to c++ so bare with. I am looking pull data from a text file that displays multiple cities in the format cityname xcoordinate ycoordinate and then displays them. For some reason though the program only displays the last cities data.
What I need to do in the long run is be able to select a few of the cities and use their coordinates in calculations so i'm wondering how I would be able to select an individual city if i needed to use it. I'm not to sure which would be easier either one would be helpful.
when selecting a city using the syntax array [n] eg city.name[1] it only gives a letter of the second character of the city rather than the second word in the list. Any ideas why this might be?