執行 ❯
建立您
自己的
網站
×
更改方向
更改主題,深色/淺色
前往 Spaces
#include <iostream> #include <list> using namespace std; int main() { // Create a list called cars that will store strings list<string> cars = {"Volvo", "BMW", "Ford", "Mazda"}; // Print list elements for (string car : cars) { cout << car << "\n"; } return 0; }
沃爾沃
寶馬
福特
Mazda