C++ List emplace_back()C++ List emplace_back() inserts a new element at the end of the list and the size of the list is increased by one. The following illustration shows how this function works:SyntaxParameterval: New value to be inserted at the end of the list. Return valueIt does not return any value. Example 1Let's see a simple example Output: 1 2 3 4 5 In this example, emplace_back() function adds a new element i.e 5 at the end of the list. Example 2Let's see a simple example Output: C+ C++ In this example, emplace_back() function adds a new character i.e '+' at the end of the list.
Next Topicemplace_front() Function
|