C++ STL deque
#include <iostream>
#include <algorithm>
#include <deque>
#include <vector>
#include <functional>
#include <iterator>
using namespace std;
int main()
{
deque<int> deq1;
deque<int>::iterator deq_iter1;
for (int k=0;k<16;k++)
{
deq1.push_back(rand());
}
for (deq_iter1 = deq1.begin();deq_iter1 != deq1.end();++deq_iter1)
{
cout << *deq_iter1 << " ";
}
cout << endl;
cout << "------------------------------"<<endl;
system("pause");
return 0;
}
QQ 3087438119