⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c11p626.txt

📁 Data Abstraction & Problem Solving with C++源码
💻 TXT
字号:
// ********************************************************// Header file PQueueException.h for the ADT priority queue.// ********************************************************#include <stdexcept>#include <string>using namespace std;class PQueueException: public logic_error{public:   PQueueException(const string & message = "")                        : logic_error(message.c_str())   { }};  // end PQueueException// *********************************************************// Header file PQ.h for the ADT priority queue.// Heap implementation.// *********************************************************#include "Heap.h"  // ADT heap operations#include "PQueueException.h"typedef HeapItemType PQueueItemType;class PriorityQueue{public:   // default constructor, copy constructor, and   // destructor are supplied by the compiler// priority-queue operations:   virtual bool pqIsEmpty() const;   virtual void pqInsert(const PQueueItemType& newItem)      throw(PQueueException);   virtual void pqDelete(PQueueItemType& PQueueItemType)      throw(PQueueException);private:   Heap h;};  // end PriorityQueue class// End of header file.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -