pqueue2.cpp
pqueue2.cpp
#include ‹iostream.h›
#include ‹stl.h›
int main() {
priority_queue‹deque‹char*›, greater_s› q;
q.push((char*) "cat");
q.push((char*) "dog");
q.push((char*) "ape");
while (!q.empty()) {
cout ‹‹ q.top() ‹‹ endl;
q.pop();
}
return 0;
}