P231、E6.2 E1(g)

来源:互联网 发布:ip与mac绑定有什么好处 编辑:程序博客网 时间:2024/04/29 23:57

template Error_codeList::remove(intposition,List_entry&x) {

   if(count==0) return underflow;

   if(position<0||position>=count) return range_error;

   x=entry[position];

   count−−;

   while(position<count){

   entry[position]=entry[position‚1]; position++;

  }

 return success;

}