单链的remove
来源:互联网 发布:如何开网络主播公司 编辑:程序博客网 时间:2024/06/05 10:46
template<class List_entry>
Error_code List<List_entry>::insert(int position,List entry_&x)
{
if(position<0||position>count)
return range_error;
Node<List_entry>*new_node,*previous,*following;
if(position>0)
{
previous=set_position(position-1);
following=previous->next;
}
else following=head;
new_node=new Node<List_entry>(x,previous);
if(new_code==NULL)
return underflow;
if(position==0)
head=following;
else
previous->next=following->next;
count--;
return success;
}
Error_code List<List_entry>::insert(int position,List entry_&x)
{
if(position<0||position>count)
return range_error;
Node<List_entry>*new_node,*previous,*following;
if(position>0)
{
previous=set_position(position-1);
following=previous->next;
}
else following=head;
new_node=new Node<List_entry>(x,previous);
if(new_code==NULL)
return underflow;
if(position==0)
head=following;
else
previous->next=following->next;
count--;
return success;
}
- 单链的remove
- Remove Linked List Elements 删除单链表里边指定的元素
- Iterator的remove()和Collection的remove()
- Iterator的remove()和Collection的remove()
- Iterator的remove()和Collection的remove()
- Iterator的remove()和Collection的remove()
- EJB的remove方法
- stl remove的例子
- remove的问题
- 红黑树的topdown-remove
- remove的用法
- 纠结的List remove
- remove函数的实现
- remove函数的实现
- remove的使用方法
- 新的 remove 函数
- 新的 remove 函数
- 关于list的remove
- iOS7: 如何获取不变的UDID
- poj 3974 Palindrome 最长回文
- win7 64下暗黑世界V1.1 服务器端及客户端的安装及运行 成功
- matlab中EYEDIAGRAM(X, N)简介
- Windows平台下NDK环境搭建
- 单链的remove
- DOS命令大全(经典收藏)
- Selenium 2 跑safari浏览器 (在windows XP系统上)
- 《暗黑世界》win下详细编译步骤,亲测通过
- ACE数据接收中粘包及半包的处理
- Android 调用系统相机拍照保存以及调用系统相册的方法
- 2013.09.04更新——【Firefly API 新版文档】 Package Netconnect
- 2013.9.24 HashMap原理研究
- 在Struts2的Action中获得request response session几种方法