Guest User

Untitled

a guest
Nov 13th, 2015
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3. // *********************************************************
  4. // Implementation file PQ.cpp for the ADT priority queue.
  5. // A heap represents the priority queue.
  6. // *********************************************************
  7. #include "PQ.h"    // header file for priority queue
  8.  
  9. bool pqClass::PQueueIsEmpty() const
  10. {
  11.     return H.HeapIsEmpty();
  12. }  // end PQueueIsEmpty
  13.  
  14. void pqClass::PQueueInsert(const pqItemType& NewItem,
  15.                            bool& Success)
  16. {
  17.     H.HeapInsert(NewItem, Success);
  18. }  // end PQueueInsert
  19.  
  20. void pqClass::PQueueDelete(pqItemType& PriorityItem,
  21.                            bool& Success)
  22. {
  23.     H.HeapDelete(PriorityItem, Success);
  24. }  // end PQueueDelete
  25. // End of implementation file.
Advertisement
Add Comment
Please, Sign In to add comment