intlist.h~

来自「hashtree算发」· H~ 代码 · 共 34 行

H~
34
字号
#define NULL 0// A node of a linked liststruct listnode {  int item;  listnode* next;};// Integer linked listclass IntList {public:  IntList();  IntList(const IntList& il);  ~IntList();  void prepend(int n);  void append(int n);  void insertSorted(int n);  void remove(int n);  listnode* locate(int n);  void copy(const IntList& il);  void clear();  bool isEmpty() { return (head==NULL); }  bool compare_k_1(const IntList& il);  bool exist(int n);  listnode* get_head() const { return head; }  int get_len() const { return len; }  void show() const;  int operator[] (int i) const;  bool operator== (const IntList& il) const;private:  listnode* head;    int len;};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?