deque - STL C++

deque<X, A>::value_type

Declaration

typedef X deque<X, A>::value_type;

Description

This is a type definition of the data type value_type for the deque class template. This is the type of object that the deque stores.

Header Include

#include <deque>

Example

#include <iostream>
#include <deque>

int main()
{
	using namespace std;

	// Create a deque and add an element to it
	deque<int> qDeque;
	qDeque.push_back(5);

	// Assign a value and output it
	deque<int>::iterator qIter = qDeque.begin();
	deque<int>::value_type qValue = (*qIter);
	cout << "The value is " << qValue << endl;

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

Output

deque<X, A>::value_type Output
 

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