You have more than enough information on this well-known algorithm to implement it in C++. See http://en.wikipedia.org/wiki/Dijkstra's_algorithm
Now, this article does not mention arc
. You can easily modify the algorithm if you need to take it into account. Look at the distance
calculation in the pseudocode (see
). When you calculate them, multiply each arc's distance with its weight, that's all you need.