Hey ; I have problems with sorting an object list in a template class. I have to sort according to a field of the list object, but I can not do it in a template class. I'm writing a function to give parameter to sort , but it is not posible to use. If someone ,who knows about this, can help me I will be so happy :) thanks .
C++ using (STL)list's sort in a template class
Collapse
X
-
Tags: None
-
What do you mean by "I'm writing a function to give parameter to sort , but it is not posible to use."? Do you mean you tried to write a function but it didn't work? Do you mean the sort function will not let you use that function? Did you mean you don't think writing a function will help? Something else? Please be a little clearer in describing your problem.Originally posted by hacker1905Hey ; I have problems with sorting an object list in a template class. I have to sort according to a field of the list object, but I can not do it in a template class. I'm writing a function to give parameter to sort , but it is not posible to use. If someone ,who knows about this, can help me I will be so happy :) thanks .
Comment