Subj : Re: how to use sort(Compare comp) To : borland.public.cpp.borlandcpp From : maeder Date : Sat Jul 31 2004 10:43 am "Scott" writes: > I'm using Borland C++ 5.02 and I came across the problem with using sort() > function. > Basically, I want to use "template void sort (Compare > comp);" function in list.h, but when I use it in my program, the compiler > complains with a message "Extra parameter in call to > std::list::sort()" > > For example, > > list strlist; > > strlist.push_back("abc"); > strlist.push_back("bcd"); > ... > strlist.push_back("xdd"); > > strlist.sort(greater()); It's a long time since I used Borland C++ 5.02, but if I remember correctly, it didn't support member templates. This would mean that you can only do strlist.sort(); The sort order is determined by operator<. .