C++ Deque empty()C++ Deque empty() function checks whether the container is empty or not. If the container is empty, it returns 1 otherwise 0. SyntaxParameterIt does not contain any parameter. Return valueIt does not return any value. Example 1Let's see a simple example when deque is not empty. Output: Deque is not empty In this example, empty() function determines that the deque is not empty. Therefore, it returns false. Example 2Let's see a simple example when deque is empty. Output: Deque is empty In this example, empty() function determines that the deque is empty. Therefore, it returns true.
Next TopicC++ Deque
|