deque - STL C++

deque<X, A>::rbegin()

Declaration

reverse_iterator deque<X,A>::rbegin();

Description

This is the rbegin() function for the deque class template.

Header Include

#include <deque>

Overloads

const_reverse_iterator deque<X,A>::rbegin() const;

Example

#include <iostream>
#include <deque>

int main()
{
	using namespace std;

	// Create a deque instance
	deque<char> qD;
	qD.push_back('X');
	qD.push_back('o');
	qD.push_back('a');
	qD.push_back('X');
	qD.push_back('.');
	qD.push_back('n');
	qD.push_back('e');
	qD.push_back('t');

	// Output the entries, using rbegin() and rend()
	deque<char>::reverse_iterator qIter;
	for (qIter = qD.rbegin(); qIter != qD.rend(); ++qIter) {
		cout << *qIter;
	}
	cout << endl;

	// Keep the window open
	cin.get();
	return 0;
}

Output

deque<X, A>::rbegin() Output
 

© 2007–2024 XoaX.net LLC. All rights reserved.