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.



LinkBack URL
About LinkBacks



They are basically a struct (or class) with an overloaded operator() and may optionally have member variables to store state.