How can we use STL priority_queue for struct ?
Any illustration of pushing & popping , where struct has multiple data-types?
Say :
You need to implement a compare function or overload operator to tell priority queue that on which order you want to sort your custom data. When priority queue will sort your data then it will need a way to know how to compare among them. You have to specify this by passing a function to priority queue or overloading operator in you custom data class or structure.
You can check this answer. This might help you. I have tried to explain multiple ways of using priority queue for custom data types.