数据结构与程序设计作业5

来源:互联网 发布:阿里云香港主机速度 编辑:程序博客网 时间:2024/05/03 19:09
Error_code List<List_entry>::remove(int position,List.entry &x)
{
if(count==0)
return underflow;
if(position<0||position>=count)
return range_enor;
x=entry[position];
for(int i=0;i<=count-2;i++)
entry[i]=entry[i+1];
count--;
return success;
}
原创粉丝点击