Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #44 Insert element in list

Insert the element x at position i in the list s. Further elements must be shifted to the right.

Inserting the element x at a given position in the list s
s.insert (s.begin () + i, x);

New implementation...