Comparator functions used in priority_queue STL

Does anyone know how to write a user-defined comparator function for priority_queue in CPP STL. I think its logic is different from others. Any help would be appreciated

Comments (1)