insert into a vector more than once c 2b 2b

Solutions on MaxInterview for insert into a vector more than once c 2b 2b by the best coders in the world

showing results for - "insert into a vector more than once c 2b 2b"
Jacopo
19 Sep 2018
1std::vector<unsigned int> array;
2
3// First argument is an iterator to the element BEFORE which you will insert:
4// In this case, you will insert before the end() iterator, which means appending value
5// at the end of the vector.
6array.insert(array.end(), { 1, 2, 3, 4, 5, 6 });