This paper introduces an improved Floyd algorithm. By comprehensively using C ++ Language Programming Techniques,we design and achieve the algorithm of the shortest path among the vertexes in a weighted directed graph,which reflects the sequential relationships between two vertexes before and after the shortest path. Started from the vertexes,the improved algorithm would make paths optimization when we calculate the shortest path among the vertexes every time. What’s more,the improved Floyd algorithm has a rapid iterative speed and its calculated quantity has been reduced to a certain extent