for(byte d = 0; d < 20; d++)
{
Array[d] = Array[d+1];
}
This will shift out the first element, and you use an IF statement, to add a NULL or 0 in the last element.
Or.
The other way would be to simply copy the elements of the Array to a new one, starting at the second element and stop before it gets to the last element.
In the context of your other thread, you don't need to. You can simply adjust your packet parsing code to start at packetBuffer[1] instead of packetBuffer[0] . Removing them is more trouble than it's worth in this case.
yes i was thinking something like this but i thought maybe there was an arduino or C function for this cases ?.
if i do start at packetBuffer[1] instead of packetBuffer[0] is fine but , i need to assign the whole loop to a function so for the start i guess i can do i+1 and to get rid of the last one i guess do the loop (i-1)++. just wanted to clean it as much as possible for further easy logic.