How to sort multiple arrays based on one and print them out
问题 I used a string-stream to read an input file with 10 lines and stored all the values into separate arrays. ID, first, last, city, state, and GPA. It looked like this. 1 Nathan Humphery Kansas MO 3.35 2 Sara Jonathan LeesSummit MO 3.56 3 Kayla James Liberty KS 3.78 4 Kyle Davis Independence KS 2.98 ... 8 Daniel Earla Independence KS 3.77 So the ID array would be { 1, 2, 3, 4, ..., 8} and the city array would be {Kansas, LeesSummit, Liberty, Independence, ..., Independence} One of the functions