Javatpoint Logo
Javatpoint Logo

C++ priority_queue pop()

C++ priority_queue pop() function is used to remove the top element of the priority_queue. The value of this function can be retrieved before being popped by calling top() function.

Syntax

Consider priority_queue 'pq' as a priority_queue object.

Parameter

It does not take any parameter.

Return value

None

Example 1

Output:

poping element  40 35 30 25 10
Next TopicC++ priority_queue



Please Share

facebook twitter google plus pinterest