C++ Deque push_front()C++ Deque push_front() function inserts new element in the beginning of the deque container and the size of the container is increased by one. SyntaxParameterval: New value to be added in the beginning. Return valueIt does not return any value. Example 1Let's see a simple example Output: 100 200 300 400 500 In this example, push_front() function adds new element i.e 100 before the first element 200. Example 2Let's see a simple example Output: java is a programming language In this example, push_front() function adds new string i.e "java" before the first string "is".
Next TopicC++ Deque
|