May you please help.I need to write a function that finds and romoves a provided argumnent in my array.Once I remove it all the other members in the queue should be shifted up in the queue.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
void Validate :: remove(List* b)// list is nother class which has a relationship with Validate class.
{
for(int i =0; i < max;i++)
{
if(queue[i] == b)
{
queue[i] = 0;
}
}
for(int i = 0; i< max; i++)
{
queue[i] = queue[i + 1];
}
max--;
}
But for some reason I cannot remove it from the array.