On Mar 29, 9:20 am, Atemporal <Atemporal.s...@gmail.com> wrote:
Just break down what you said...
I want to create a list,
OK... std::list<N> mylist;
each element is an array of 2 integers,
OK... std::list< boost::array<int,2> > myList (or whatever array
structure you like if you don't have the boost library)
and I want to sort the list according to the first integer of each
element,
std::sort(myList, accordingToTheFirstInteger);
bool accordingToTheFirstInteger(boost::array<int,2>& x,
boost::array<int,2>& y)
{
// Put how you want to sort them here. (Odd first, then even? OR
largest to smallest)
// Seehttp://msdn2.microsoft.com/en-us/library/ecdecxh1(VS.80).aspx
}
is there a simple way to do this? thanks a lot.- Hide quoted text -
- Show quoted text -
thanks for your reply.
i'm a beinnger and i do not have boost library.