W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
#include
#include
using namespace std; int main() { deque
cars = {"Volvo", "BMW", "Ford", "Tesla"}; // 移除首元素 cars.pop_front(); // 移除尾元素 cars.pop_back(); // 打印双端队列元素 for (string car : cars) { cout << car << "\n"; } return 0; }