Hello,
I am looking for examples of inserting a value into an array on integers at a specific position in the array. Is there simplified way to accomplish this?
Printable View
Hello,
I am looking for examples of inserting a value into an array on integers at a specific position in the array. Is there simplified way to accomplish this?
Code:int array[10];
array[3] = 50;
Do you mean like having an array of four items, then populating the first three, then trying to insert an item as the first one? If so, I suggest that you use a linked list. It will save you a lot of time (both writing it and running it).
Thanks for your inputs! It helped :D