Demonstrate a priority_queue.
#include <iostream> #include <queue> using namespace std; int main() { priority_queue<int> queueObject; queueObject.push(1); queueObject.push(3); queueObject.push(4); while(!queueObject.empty()) { cout << "Popping "; cout << queueObject.top() << endl; queueObject.pop(); } return 0; }