views:

486

answers:

2

I need to implement extract min for heap(in c++ if possible), could not get this method from STL heap.

+3  A: 

Pass in std::greater<*> to the std::*_heap functions.

MSN
A: 

Yes and I forgot to quote, the element in the heap are not integer, its a struct with value, position and some other pointers. I am thinking STL heap cannot be used directly, Can I

GUTTZ