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

📄 llist.h

📁 用VC编写的单链表 是数据结构中线性表中的一种
💻 H
字号:
// llist.h: interface for the llist class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LLIST_H__A5618B5F_8656_427B_98FC_75E34C39BEEA__INCLUDED_)
#define AFX_LLIST_H__A5618B5F_8656_427B_98FC_75E34C39BEEA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include<iostream>
using namespace std;
#include "link.h"
class llist  
{
private:
	link* head;
	link* tail;
	link* fence;
	int leftcnt;
	int rightcnt;
	void init(){fence=tail=head=new link;}
	void removeall(){
		while(head!=NULL)
		{
			fence=head;
			head=head->next;
			delete fence;
		}
	}
public:
	bool exchange();
	void print() const;
	bool setpos(int pos);
	void prev();
	bool remove(double&);
	bool append(const double&);
	void setend(){fence=tail;leftcnt+=rightcnt;rightcnt=0;}
	bool insert(const double&);
	llist(int size=0){init();};
	virtual ~llist(){removeall();};
};
#endif // !defined(AFX_LLIST_H__FF868D5B_CA76_45B6_92A0_A5587C84C59D__INCLUDED_)

⌨️ 快捷键说明

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