Is there a way to move data from one map to another without it being re-sorted? Ex: I have a map of
<int, pair<string, int> where the key is the number of vowels in the string (int) and the pair contains a moviename as string and rating as int (multiple entries for each moviename). I want to move this data to two maps; one with the moviename as key and total of all ratings as value, and one with the moviename as key and the number of all ratings as value. These should stay sorted in the same order (lowest number of vowels to greatest). Then the data should be outputted as moviename, number of reviews, average review score.
I already have the program work to sort the first list properly. The list contents make it into the second list, and get outputted properly, but not in the right order.
If anyone can help, that would be great.