Using the class priority_queue in the Standard Template Library, write a C++ program that uses the priority_queue class to store and manipulate fl oating point numbers. The class priority_queue has...


Using the class priority_queue in the Standard Template Library, write a C++ program that uses the priority_queue class to store and manipulate fl oating point numbers. The class priority_queue has the following methods that you can use:


priority_queue();                                                                             // Default constructor


 bool empty() const;                                                                       // Tests whether the priority queue is empty


 void push(const Item Type& new Entry);                             // Adds new Entry to the priority queue


 void pop();                                                                                         // Removes the entry having the highest priority


Item Type& top();                                                                           // Returns a reference to the entry having the


// highest priority


 To access priority_queue , use the following include statement:


#include <>;

May 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here