📄 link.h
字号:
const int volume=10;
//node类的定义
class Node
{
private:
Node * next;
public:
int data;
Node(const int & item ,Node * nextptr=NULL);
~Node();
Node * NextNode()const; //返回结点的下一个结点
void InsertAfter(Node * p);//当前结点后插入结点p
Node * DeleteAfter();//删除当前结点的后继结点并返回结点的值
};
//link类的定义
class Link
{
private:
Node * head;
Node * front,* rear;
Node * prevptr, * currptr;
int size;
Node * GetNode(const int & item,Node * nextptr=NULL );
public:
Link(int a[] );
~Link();
void InsertRear();// 在链表的尾部插入结点
void InsertFront(const int & item);//在链表头部插入结点
void PrintList(); //链表的遍历并打印
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -