K
Kelvin Moss
Hi all,
By default Priority Queues use the less<> function object. This causes
the highest element to be retrieved first. To get the least element
one should use the greater<> function object. Can someone explain how
this works? I ask this to know that how should I write my custom
function object if I want the least element from my custom class.
Thanks ..
P.S. - I am getting confused with the notion of defining great and
less as defined in the priority queue
By default Priority Queues use the less<> function object. This causes
the highest element to be retrieved first. To get the least element
one should use the greater<> function object. Can someone explain how
this works? I ask this to know that how should I write my custom
function object if I want the least element from my custom class.
Thanks ..
P.S. - I am getting confused with the notion of defining great and
less as defined in the priority queue