#include
#include
#include
using namespace std;
class Prioritize {
public:
int operator() ( const pair& p1,
const pair& p2 ) {
return p1.second < p2.second;
}
};
int main()
{
priority_queue< pair< string, unsigned int >,
vector >, Prioritize > pq;
pq.push( pair( "Event 1", 2) );
pq.push( pair( "Event 2", 10 ) );
pq.push( pair( "Event 3", 1 ) );
while ( !pq. empty() ) {
cout << pq.top().first << endl;
pq.pop();
}
return 0;
}