My professor has given me this programming assignment to be done in C++ (which I have never really used, but I know the basic syntax) Here is the problem:

We are given a chart with 10 cities and how long it takes to get from one to the other, we have to determine what would be the fifth shortest route to take and the third longest, visiting every city starting from 'A' and ending in 'A'.

It looks to me like I'm going to have to make a vector to keep track of all of the trips, and to determine every trip possible I will need a permutations function (which I have already), and to keep track of all of the distances I would need an 8X8 matrix. Using this method, I do think I know everything that's going to have to done, but it just seems like a lot (to me), I just wanted to make sure I am on the right track before I get started. Also after I finish this, I'm going to have to write the program again in fortran, is that going to be a lot more difficult? Thanks for any help anybody offers!