typedef size_t deque<X, A>::size_type;
#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); // Get the number of elements in the deque and output it deque<int>::size_type qSize = qDeque.size(); cout << "The size is " << qSize << endl; // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.