Inserting an Iterator Range into a Set
Difference between en9 and en10, changed 0 character(s)
// 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;↵
}

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en10 English Asliddin2010 2024-12-16 13:31:04 0 (published)
en9 English Asliddin2010 2024-12-16 13:30:50 1019
en8 English Asliddin2010 2024-12-16 13:29:27 3711 For those who didn't know, if you know, just a revision :)
en7 English Asliddin2010 2024-12-16 13:26:24 2498
en6 English Asliddin2010 2024-12-16 13:25:41 461
en5 English Asliddin2010 2024-12-16 13:24:48 1942
en4 English Asliddin2010 2024-12-16 13:23:19 4 Tiny change: 'or Range\ninclude ' -> 'or Range\n\n\ninclude '
en3 English Asliddin2010 2024-12-16 13:22:03 17
en2 English Asliddin2010 2024-12-16 13:18:58 41 For those who didn't know, if you know, just a revision :)
en1 English Asliddin2010 2024-12-16 13:16:21 463 For those who didn't know, if you know, just a revision :) (saved to drafts)