deque - STL C++

deque<X, A>::const_pointer

Declaration

typedef const X* deque<X, A>::const_pointer;

Description

This is a type definition of the data type const_pointer for the deque class template. This type is used to reference elements in the container.

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 pointer and output the element
	deque<int>::const_iterator qIter = qDeque.begin();
	deque<int>::const_pointer qPtr = &(*qIter);
	cout << "qPtr points to = " << *qPtr << endl;

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

Output

deque<X, A>::const_pointer Output
 

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