I could use some help. I am writting two functions, one is popBack and
one is popFront.
popFront needs to remove a data element from the front of my data
structure.
popFront (T& n)
{
}
popBack needs to remove a data element from the rear of my data
structure
popBack (T& n)
{
}
I have two functions shiftRight and shiftLeft that will move the
elements in the array right or left.
void shiftRight()
{
//decrement this iteration
for (int i = size; i >= 0; i--)
{
data[i] = data[i - 1];
}
size++;
}
void shiftLeft ()
{
for (int i = 0; i < size; i++)
{
data[i] = data[i + 1];
}
size--;
}