deque cbegin() in C++ STL
The cbegin() method in deque is a function in C++ STL which returns an iterator pointing to the first element of the container.
Return value: It returns a constant iterator pointing to the first element of the deque. This means, that the iterator can be used to traverse the queue, but not to modify it. That is, functions like insert, erase would throw an error if called using a constant iterator.
The constant iterator should be used when you want no part of your code to modify the contents of the deque.
The following programs illustrates the function.
First element of the deque is: 2
First element of the deque is: 45