You aren't assigning the variable index a value before calling the functions removeAt and insertAt. So you need to fix that first.
Well I just noticed that you are asking for the index in your function, in which case why are you passing "index" to it ? You really shouldn't be passing in arguments which have no valid values.
Now in your removeAt function you do this
for (int i = 0; i < length; i++)
{
numbers[i] = numbers[i+1];
cout<<numbers[i]<<" ";
}
You are shifting all the values starting from position 0, you only need to shift them starting at position index.
Last edited by stilllearning; Oct 21st, 2008 at 1:51 am.