**** Post for FREE via your newsreader at post.usenet.com ****
Victor Bazarov said:
std:
riority_queue?
std:
riority_queue myqueue;
... // fill it up
// clear it:
When you say "clear it", do you mean that I need to pop off all items? I'm
worried about proper destruction of the elements of the priority_queue. If
this is the case, doesn't
while( myqueue.size() > 0 )
myqueue.pop();
do the job? But is this the fastest way to do it? For std::vector there is
std::vector::clear, and I couldn't find anything analagous for
std:
riority_queue.
myqueue = std:
riority_queue(); // assign an empty one to it
Victor
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=