You can do it, when you move all other elements to a new place. So when inserting at position 0 you must start with copying all elemenst one position higher. Best done, when starting with the last element.
Another approch is to use some standard C++ classes - here the
std:vector which has the
insert function which implements a lot of such boring array operations and is well tested.