主页
C++
C++ 双端队列
demo_deque_remove
运行 ❯
×
更改方向
保存代码
更改主题
#include
#include
using namespace std; int main() { deque
cars = {"Volvo", "BMW", "Ford", "Mazda"}; // Remove the first element cars.pop_front(); // Remove the last element cars.pop_back(); // Print list elements for (string car : cars) { cout << car << "\n"; } return 0; }
BMW
Ford