Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #comparator #priority #queue
ADD COMMENT
Topic
Name
6+2 =