W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
#include
#include
using namespace std; int main() { // 创建字符串链表 cars list
cars = {"Volvo", "BMW", "Ford", "Tesla"}; // 使用迭代器遍历链表 for (auto it = cars.begin(); it != cars.end(); ++it) { cout << *it << "\n"; } return 0; }