Javatpoint Logo
Javatpoint Logo

C++ Deque pop_front()

C++ Deque pop_front() function removes the first element from the deque and the size of the container is reduced by one.

Syntax

Parameter

It does not contain any parameter.

Return value

It does not return any value.

Example 1

Let's see a simple example

Output:

20 30 40 50 

In this example, pop_front() function removes the first element i.e 10 from the deque.

Example 2

Let's see a simple example

Output:

C++ java .net 

In this example, pop_front() function removes the first string i.e "C" from the deque.


Next TopicC++ Deque



Please Share

facebook twitter google plus pinterest