![]() |
VOOZH | about |
The list::push_front() is a built-in function in C++ STL which is used to insert an element at the front of a list container just before the current top element. This function also increases the size of the container by 1.
list_name.push_front(dataType value)
Example: The following program demonstrates the use of list::push_front():
Initial List: 10 20 30 40 List after push_front(): 5 10 20 30 40
Explanation: