SimplyLinked Implementation
Template<classList_entry>
Error_codeList <List_entry>::remove(int position,const List_entry &x)
{
If(position<0||position>count)
Returnrange_error;
Node<List_entry>*new_node,*previous,*following;
If(position>0)
{
previous=set_position(position-1);
previous=following->next//Following=previous->next;
}
//Elsefollowing =head;
//New_code=newNode<List_entry>(x,following);
If(new_node==NULL)
Return underflow;//overflow;
If(position==0)
Head=N//Head=new_node;
Else
Previous->next=new_node;
Count--;
Returnsuccess;
}