Javatpoint Logo
Javatpoint Logo

C++ Deque clear()

C++ Deque clear() function removes all the elements from the deque and the size of the deque is reduced to zero.

Syntax

Parameter

It does not contain any parameter.

Return value

It does not return any value.

Example

Let's see a simple example

Output:

Content of first deque:1 2 3 
Now,Content of first deque:4 5 6 

Next TopicC++ Deque



Help Others, Please Share

facebook twitter pinterest