manupulating function objects

hi!
to make a minheap out of a vector "cont" the function is make_heap(cont.begin(),cont.end(),greater<int>)

now this works if the contents of the vector "cont" are single integers what do we do if it is a pair of int ie: cont<pair<int,int> >

what change do I make to function operator greater<int>.

thanks a lot.
By Mini-Heap. Are you trying to organise the contents of greater<int> incrementally into cont ?

Can you please add some clarification to your question.
The top most element will be smallest and its children will be lesser than it and so on.every parent in the tree is smaller than the children.
Topic archived. No new replies allowed.