qfedu-cpp-level/day9/stl_deque_demo/d2.cpp

21 lines
302 B
C++
Raw Permalink Normal View History

#include <bits/stdc++.h>
using namespace std;
int main()
{
int m[] = {1, 2, 3, 4, 5, 6};
deque<int> d1;
deque<int> d2(m, m + 6);
deque<int>::iterator it = d2.begin();
while (it != d2.end())
{
cout << *it << " ";
it++;
}
cout << endl;
return 0;
}