pqueue1.cpp

We use cookies. Read the Privacy and Cookie Policy

pqueue1.cpp

#include ‹iostream.h›

#include ‹stl.h›

int main() {

 priority_queue‹deque‹int›, less‹int› › q;

 q.push(42);

 q.push(101);

 q.push(69);

 while (!q.empty()) {

  cout ‹‹ q.top() ‹‹ endl;

  q.pop();

 }

 return 0;

}