inserts val before loc, returning an iterator to the element inserted,

inserts num copies of val before loc, or

inserts the elements from start to end before loc.

Note that inserting elements into a vector can be relatively time-intensive,
since the underlying data structure for a vector is an array. In order to
insert data into an array, you might need to displace a lot of the elements of
that array, and this can take linear time. If you are planning on doing a lot
of insertions into your vector and you care about speed, you might be better
off using a container that has a linked list as its underlying data structure
(such as a list or a deque).

For example, the following code uses the insert() function to splice four
copies of the character 'C' into a vector of characters: