2
来源:互联网 发布:苹果电脑删除不了软件 编辑:程序博客网 时间:2024/06/08 15:05
template<class node_entry>
struct node
{ node_entry entry;
node<node_entry>*next;
node();
node(node_entry,node<node_entry>*link=NULL);
};
template<class List_entry>
class List
{
public:
~List();
List(const List<List_entry>©);
void operator=(const List<List_entry>©);
protected:
int count;
node<List_entry>*head;
node<List_entry>*set_position(int position) const;
};
template<class List_entry>
Error_code List<List_entry>::remove(int position,const List_entry&x);
if(position<1 || position>count)
return range error;
node<List_entry>*new_node,*previous,*following,*present;
if(new_node==NULL)
return overflow;
else
{new_node=present-->link;
present-->link=new_node-->link;
previous-->link=position-->link;
delete present;
return success;
}
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- >2
- 2
- 2
- 2
- 常用的图像处理小算法
- 【第一部分 第一章】The C Programming Language 程序研究 【持续更新】
- 解决Android library project cannot be launched
- 关于缓存调度算法FIFO、LRU、OPT这三种置换算法的缺页次数
- 1
- 2
- 中标麒麟,安装jdk1.7,提示`GLIBC_2.4' not found
- eclipse中在项目中查找指定文件
- 关于设计模式2
- GWT 中的Cookies的使用
- button 笔记
- c:import 标签详解
- javascript面向对象(给对象添加属性和方法的方式)
- DWORD变量在内存中和纯单引号的串在内存中存储顺序