C++ Deque assign()C++ Deque assign() function assigns new contents to the deque container and the size of the container is modified accordingly. SyntaxParameter(first,last): It defines the range between which the new elements to be inserted. n: It defines the new size of the deque container. val: New value to be inserted. Return valueIt does not return any value. Example 1Let's see a simple example Output: 1 2 3 4 In this example, assign() assigns the content of first container to the second container. Example 2Let's see a simple example Output: 6 6 6 6 6 In this example, assign() function assigns the value '6' five times to the deq container. Next TopicC++ Deque |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India