C++ List emplace_front()
C++ List emplace_front function adds a new element in the beginning of the list and the size of the container is increased by one.
The following illustration shows how this function works:
val: The value which is to be inserted in the beginning of the list.
It does not return any value.
Let's see a simple example
C is a programming language.
In this example, emplace_front() function adds new different strings in the list li and the output becomes "C is a programming language".