back
语法:
1 |
reference back(); |
back()返回一个引用,指向双向队列中最后一个元素。
1 2 3 4 5 6 7 8 9 10 11 12 13 |
源代码 /** * Returns a read/write reference to the data at the last element of the * %deque. */ reference back() { iterator __tmp = this->_M_impl._M_finish; --__tmp; return *__tmp; } |
测试代码:
测试结果:
5
请按任意键继续. . .