I have a set of arrays with cities, countries, latitudes, and latitudes. c++ language.
ifstream file("worldcities.csv");
getline(file, temporay);
//inputs the file into 4 arrays for each catergories
for (i=0;getline(file,(cities[i]),',');i++)
{
getline(file, countries[i], ',');
getline(file, latitude[i], ',') ;
getline(file, longitude[i]);
}
How do i sort the array of latitudes and longitudes at the same time to find top five lowest or highest to all the others on the list but at the same time do no lose the elements of cities and countries those lats n longs are associated with?