Browse - programming tips - stl sorted vectorDate: 2007dec10 Language: C++ Q. How do I keep the elements of an STL vector always in order? A. I have had good success with Martin Holzherr's sorted_vector template: http://www.codeproject.com/KB/stl/sorted_vector.aspx It's far faster than doing std::sort() after each push_back(). Add a commentSign in to add a comment |