> > Does the sort() function always sort elements in ascending order? > This one sorts in descending order. Why? You have to wait till CS3 to find out. sort(v.begin(), v.end(), std::greater<int>()); Thanks, -- Mikhail