Arrays
Posted: Sun Sep 21, 2014 10:50 am
Once defined and filled and array, is there a way to delete an element?
Say
(pseudocode)
For i = 0 to 5
SetArray (i, i*i, myArray);
end for
So I've a 6 elements array (0,1,4,9,16,25)
I pick a random element say index 3 value 9, and once used this value, I want to remove that index, so the array will compact to 5 elements. ((0,1,4,16,25). Is there functions that I missed or… should I do it "by hand"?.
Say
(pseudocode)
For i = 0 to 5
SetArray (i, i*i, myArray);
end for
So I've a 6 elements array (0,1,4,9,16,25)
I pick a random element say index 3 value 9, and once used this value, I want to remove that index, so the array will compact to 5 elements. ((0,1,4,16,25). Is there functions that I missed or… should I do it "by hand"?.