C++ using (STL)list's sort in a template class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hacker1905
    New Member
    • Feb 2008
    • 1

    C++ using (STL)list's sort in a template class

    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 .
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    Originally posted by hacker1905
    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 .
    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.

    Comment

    • catborise
      New Member
      • Feb 2008
      • 2

      #3
      i must sort clist using price criteria. I hope i can describe my problem..


      thanks

      Comment

      • catborise
        New Member
        • Feb 2008
        • 2

        #4
        thanks, i solve it. After exhausted workings

        Comment

        • sicarie
          Recognized Expert Specialist
          • Nov 2006
          • 4677

          #5
          catborise-

          Please check your Private Messages, accessible through the PM's link in the top right corner of the page.

          Thanks,

          sicarie

          Comment

          Working...