執行 ❯
建立您
自己的
網站
×
更改方向
更改主題,深色/淺色
前往 Spaces
#include <iostream> #include <list> using namespace std; int main() { list<string> 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; }
寶馬
福特