// 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;}
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3611 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | Radewoosh | 3415 |
| 8 | Um_nik | 3376 |
| 9 | maroonrk | 3361 |
| 10 | XVIII | 3345 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 164 |
| 2 | adamant | 150 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 144 |
| 5 | errorgorn | 141 |
| 6 | cry | 139 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
Inserting an Iterator Range into a Set
// 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;}
| Rev. | Lang. | By | When | Δ | Comment | |
|---|---|---|---|---|---|---|
| en10 |
|
AsLegend | 2024-12-16 13:31:04 | 0 | (published) | |
| en9 |
|
AsLegend | 2024-12-16 13:30:50 | 1019 | ||
| en8 |
|
AsLegend | 2024-12-16 13:29:27 | 3711 | For those who didn't know, if you know, just a revision :) | |
| en7 |
|
AsLegend | 2024-12-16 13:26:24 | 2498 | ||
| en6 |
|
AsLegend | 2024-12-16 13:25:41 | 461 | ||
| en5 |
|
AsLegend | 2024-12-16 13:24:48 | 1942 | ||
| en4 |
|
AsLegend | 2024-12-16 13:23:19 | 4 | Tiny change: 'or Range\ninclude ' -> 'or Range\n\n\ninclude ' | |
| en3 |
|
AsLegend | 2024-12-16 13:22:03 | 17 | ||
| en2 |
|
AsLegend | 2024-12-16 13:18:58 | 41 | For those who didn't know, if you know, just a revision :) | |
| en1 |
|
AsLegend | 2024-12-16 13:16:21 | 463 | For those who didn't know, if you know, just a revision :) (saved to drafts) |
| Name |
|---|


