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