How to sort an array of objects using the C++ STL?

I’m trying to implement the Kruskal’s algorithm to find the MST of a graph. I need to sort the set of vertices according to their weights. How can I do this using the STL?

//