I am new to C++ and I am trying to use the STL priority queue to make a min heap of objects based of off the distance property in the object. I am not fully sure what I need to do but I've looked around and I that my priority queue would look something like this:
std::priority_queue<Class, std::vector<Class>, object.distance> pq;
What I am not fully sure about is how I go about overloading the comparison operator first to change the heap to a min heap and second to compare my objects based off of a property. Any help would be appreciated?