Logo

Programming-Idioms

History of Idiom 44 > diff from v30 to v31

Edit summary for version 31 by fantasy:
New Cpp implementation by user [fantasy]

Version 30

2017-04-06, 10:02:22

Version 31

2018-05-08, 01:35:40

Idiom #44 Insert element in list

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

Illustration

Idiom #44 Insert element in list

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

Illustration
Code
s.insert (s.begin () + i, x);