typedef (unspecified) deque<X, A>::const_iterator;
#include <deque>
#include <iostream> #include <deque> int main() { using namespace std; // Create a deque and add four elements to it deque<int> qDeque; qDeque.push_back(5); qDeque.push_back(101); qDeque.push_back(-4); qDeque.push_back(32); // Use the iterator to access and output the elements deque<int>::const_iterator qIter; for (qIter = qDeque.begin(); qIter != qDeque.end(); ++qIter) { cout << "Deque entry = " << *qIter << endl; } // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.