im trying to insert a number into an array but when i insert a number it deletes the last number instead of increasing the array size by one....this is the code i have:

void Insertion(float T[100],int size)
float target = 0.0;
cout<<"Enter the number you are inserting"<<endl;
outData<<"Enter the number you are inserting"<<endl;

int k=0;
while((k< size) && (T[k] < target))
for(int index = size -1; index>=k;index --)
T[index + 1] = T[index];

T[k] = target;
size = size + 1;


as jwenting said you CANT increase the size of an array, you have to make a seperate bigger one and copy, or use a linked list / vector solution. No need to x2 post! :)