CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: OrangeKyo

Search: Search took 0.03 seconds.

  1. Re: Sorting an STL of pointers to comparable objects.

    To Monarch. I probably should have clarified. My mistake.

    The command

    priority_queue<Leaf*,vector<Leaf*>, PairComparator> leaves;

    does not create a priority queue of vectors. It creates a...
  2. Re: Sorting an STL of pointers to comparable objects.

    Awesome. I got it with this. Thanks a bunch.

    class leafcompare {
    public:
    bool operator()(const Leaf *p1, const Leaf *p2) const {
    return p1->frequency > p2->frequency;
    }
    };
    ...
  3. Sorting an STL of pointers to comparable objects.

    Hi, I have a class called Leaf with a member variable int frequency. I want to load pointers of this class into a priority_queue or a sortable vector so that it sorts based on frequency.

    I've...
Results 1 to 3 of 3





Click Here to Expand Forum to Full Width

Featured