about BaseList

Dear Prof.

There may be a mistake in the class of BaseList.
ent BaseList::remove_nth(int n)
    {
     ......
     for ( ; n < num_entries; n++ ) //this is to remove the member following
  entry[n] = entry[n+1]; //the nth one forward.

     entry[n] = 0; // for debugging ???Is this to make the nth one null?
     ......
     }
I thank that it should make the nth one null before removing the member following the nth one forward.And the code should be :
ent BaseList::remove_nth(int n)
    {
     ......
     entry[n] = 0; // for debugging ???Is this to make the nth one null?
          for ( ; n < num_entries; n++ ) //this is to remove the member following
  entry[n] = entry[n+1]; //the nth one forward.
     ......
    }
Or I get the wrong idea of your code?
Thanks very much,
Have a nice day.
Ciao
         Cloud

No. The n-th entry is removed by moving all following entries one
position to the front, i.e. the n-th entry is overwritten by the
n+1-th.

The line above clears the array position that has been the end of
the list before we deleted the n-th element. This is not necessary
but helps debugging.

Robin