I need to write a function that adds entered values to a sequence AFTER the current_index
void sequence::attach(const value_type& entry)
{
assert(size( ) < CAPACITY);
size_type j;
if (!is_item())
current_index=0;
for (j=used; j>current_index; --j)
data[j] = data[j-1];
data[current_index] = entry;
++used;
}
current_index is the position in the dara array where it is currently pointed to
used is the number of used slots in the array
so i have the for loop to copy the current numbers to the next slot on the right in the array but then new value that is to be inserted has to be after the current_index and the function i have now places it before
i have no idea how to make that change