Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to 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; }
BMW
Ford
Mazda
Volvo