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