运行 ❯
获取
你的
网站
×
更改方向
更改主题,暗/亮
前往 Spaces
#include <iostream> #include <set> using namespace std; int main() { // Create a set called cars that will store strings set<string> cars = {"Volvo", "BMW", "Ford", "Mazda"}; // Loop through the set with an iterator for (auto it = cars.begin(); it != cars.end(); ++it) { cout << *it << "\n"; } return 0; }
沃尔沃
宝马
福特
马自达