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;
}
};
priority_queue<Leaf* , vector<Leaf*>, leafcompare> leaves;
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 7 of 7
Threaded View
Tags for this Thread |
Click Here to Expand Forum to Full Width |