So I have to push/pop instead of access it like a typical array?
I don't get what you're trying to do. A priority_queue is basically a min/max-heap. Why would you perform another "heapify" operation on it? The data structure does not allow Random Access to prevent people from invalidating the heap.
- If you need a max/min-heap use std::priority_queue
- if you want to implement one yourself, use std::vector as backing data structure, it will grow and shrink if necessary and offers Random Access
Additionally you pass many parameters as copies, modifying them without storing them inside the class or returning them is basically a noop (you won't be able to see the changes made)