Answers for "comparator for priority queue c++"

C++
3

comparator for priority queue c++

class Foo
{

};

class Compare
{
public:
    bool operator() (Foo, Foo)
    {
        return true;
    }
};

int main()
{
    std::priority_queue<Foo, std::vector<Foo>, Compare> pq;
    return 0;
}
Posted by: Guest on December-25-2020

Code answers related to "comparator for priority queue c++"

Browse Popular Code Answers by Language