pop_front() //删除第一个容器第一个数据
-
- deque<int> d;
- d.push_back(10);
- d.push_back(100);
- d.push_front(20);
- d.push_front(200); //200 20 10 100
-
-
- d.pop_back();
- d.pop_front(); //20 10
-
- d.insert(d.begin(),666); //666 200 20 10 100
- d.insert(d.begin(),2,8888); //8888 8888 666 200 20 10 100
- deque<int> d2;
- for(int i=0;i<3;i++)
- d2.push_back(i+1);
- d.insert(d.begin(),d2.begin(),d2.end()); //1 2 3 8888 8888 666 200 20 10 100
-