7 lines
221 B
C++
7 lines
221 B
C++
|
|
#include <deque>
|
||
|
|
|
||
|
|
std::deque<int> d; // empty deque
|
||
|
|
d.push_back(5); // insert a 5 at the end
|
||
|
|
d.push_front(7); // insert a 7 at the beginning
|
||
|
|
d.insert(v.begin()+1, 6); // insert a 6 in the middle
|