C++ Deque begin()C++ Deque begin() function returns an iterator pointing to the first element of the deque container. If the container is empty then the returned iterator will be equal to the end(). SyntaxParameterIt does not contain any parameter. Return valueIt returns an iterator pointing to the first element of the deque. Example 1Let's see a simple example Output: first element of the deque:1 In this example, begin() function returns an iterator of the first element. Example 2Let's see a simple example In this example, begin() function is incremented by 2. Therefore, begin() function returns an iterator of the third element.
Next TopicC++ Deque
|