I\'m trying to declare a priority queue in c++ using a custom comparison function...
So , I declare the queue as follows:
std::priority_queue
you have to specify function type and instantiate the function in priority_queue constructor.
priority_queue
#include bool compare(int a, int b) { return (a, std::function> pq(compare);