C++ accessing in priority queue
/* Program to access an element of highest priority */
#include<iostream>
#include<queue> //Header-file for queue
using namespace std;
int main()
{
priority_queue<int> p1;
p1.push(35);
p1.push(40);
p1.push(95);
p1.push(25);
cout<<p1.top(); //fetch element of highest
priority(maximum element) i.e 95
}