If you place the numbers into a list then they will sort with the sort member function.
std::list <int> a_list;
Vector also has this capability. You may have to create a predicate function if you are tring to sort on an element of a structure that is in the list delcaration. The links go to the MSDN pages for the given members. Hopefully that helps somewhat!
Alexsandro Meireles <firstname.lastname@example.org> wrote:
Does anyone know any function to order elements?
What I need is to pick up a list of numbers like: 1 232 44 5 5 45 5 45 545 and get an ordered list like 1 5 5 5 44 45 45 232 545, i.e., from the minimum value to the maximum value.
Thanks in advance!