begin
语法:
1 |
iterator begin(); |
begin()函数返回一个迭代器,指向双向队列的第一个元素。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
源代码 /** * Returns a read/write iterator that points to the first element in the * %deque. Iteration is done in ordinary element order. */ iterator begin() { return this->_M_impl._M_start; } /** * Returns a read-only (constant) iterator that points to the first * element in the %deque. Iteration is done in ordinary element order. */ const_iterator begin() const { return this->_M_impl._M_start; } |
测试代码:
测试结果:
1
请按任意键继续. . .