// syntax for inserting elements in set using iterator range↵
↵
s.insert(v.begin(), v.end());↵
↵
for (int x : s) {↵
cout << x << " ";↵
}↵
// Output: 10 20 30↵
↵
return 0;↵
}
↵
s.insert(v.begin(), v.end());↵
↵
for (int x : s) {↵
cout << x << " ";↵
}↵
// Output: 10 20 30↵
↵
return 0;↵
}