Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. bool cmpFunc(const node* a,const node* b)
  2. {
  3. return (a->freqOfAlphabet) <= (b->freqOfAlphabet) ;
  4. }
  5.  
  6. class huffmanEncoder
  7. {
  8. set<node*,bool (*)(const node*,const node*)> mset(&cmpFunc) ;// throws error
  9. ....
  10. }
  11.  
  12. int main()
  13. {
  14. set<node*,bool (*)(const node*,const node*)> mmset(&cmpFunc) ; // works fine
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement