CPP menggabungkan dua set
#include <iostream>
#include <set>
#include <algorithm>
int main()
{
std::set<int> odd = { 1, 3, 5 };
std::set<int> even = { 2, 4, 6 };
std::set<int> s(odd);
s.insert(even.begin(), even.end());
for (auto const &e: s) {
std::cout << e << ' ';
}
return 0;
}
Jazz #