Library Version 12.1.6.2

insert
Prev | Chapter 4. Db_vector | Next

## insert

### Function Details

    iterator insert(iterator pos,
        const T &x)

Insert x before position pos.

#### Parameters

##### x

The element to insert.

##### pos

The position before which to insert.

    void insert(iterator pos, size_type n,
        const T &x)

Insert n number of elements x before position pos.

#### Parameters

##### x

The element to insert.

##### pos

The position before which to insert.

##### n

The number of elements to insert.

    void insert(iterator pos, InputIterator first,
        InputIterator last)

Range insertion.

Insert elements in range [first, last) into this vector before position pos.

#### Parameters

##### last

The open boundary of the range.

##### pos

The position before which to insert.

##### first

The closed boundary of the range.

    void insert(iterator pos, const_iterator first,
        const_iterator last)

Range insertion.

Insert elements in range [first, last) into this vector before position pos.

#### Parameters

##### last

The open boundary of the range.

##### pos

The position before which to insert.

##### first

The closed boundary of the range.

### Group: Insert functions

The iterator pos in the functions must be a read-write iterator, can't be read only.

http://www.cplusplus.com/reference/vector/vector/insert/

### Class

db_vector

Prev | Up | Next
pop_front | Home | erase