I have used something like
Code: Select all
struct RevInt
{
int value;
bool operator<(const RevInt &b) const
{
return b.value < value;
}
}
priority_queue<RevInt> pq;
But I was wondering how to use the constructor that overloads the default Compare function for integer. What I mean to say is I want to use something like
Code: Select all
priority_queue<int> pq;