Javatpoint Logo
Javatpoint Logo

C++ List pop_front()

C++ List pop_front() function removes the first element from the list and therefore, reducing the size of the list by one.

C++ List pop_front()

pop_front() function removes the first element i.e 1.

Syntax

Parameter

It does not contain any parameter.

Return value

It does not return any value.

Example

Let's see a simple example

Output:

30,40,50

In this example, pop_front() function removes the first element from the list i.e it removes the element '20' from the list.


Next Topicempty() Function



Please Share

facebook twitter google plus pinterest