⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 link.h

📁 链表与数组的数据交换 数据结构的实验基本内容 讲数组中的数存进链表
💻 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 + -