Group: comp.lang.c++
From: Kelvin Moss
Date: Wednesday, April 09, 2008 5:11 PM
Subject: Priority queue question

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

Safety Articles | Usenet Groups | 20lbs in 30 days