list.h
来自「数据结构与程序设计教材源码 数据结构与程序设计教材源码」· C头文件 代码 · 共 23 行
H
23 行
const int max_list = 5000;
template <class List_entry>
class List {
public:
// methods of the List ADT
List();
int size() const;
bool full() const;
bool empty() const;
void clear();
void traverse(void (*visit)(List_entry &));
Error_code retrieve(int position, List_entry &x) const;
Error_code replace(int position, const List_entry &x);
Error_code remove(int position, List_entry &x);
Error_code insert(int position, const List_entry &x);
protected:
// data members for a contiguous list implementation
int count;
List_entry entry[max_list];
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?