#include <iostream>
#include <list>
using namespace std;
int main() {
// 创建字符串链表 cars
list<string> cars = {"Volvo", "BMW", "Ford", "Tesla"};
// 使用迭代器遍历链表
for (auto it = cars.begin(); it != cars.end(); ++it) {
cout << *it << "\n";
}
return 0;