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

📄 circlequeue.h

📁 这是一个linux下的Shell.有命令历史和命令提示
💻 H
字号:
#ifndef _CIRCLEQUEUE_#define _CIRCLEQUEUE_#include <string.h>struct Node_Queue{	Node_Queue(char* p,Node_Queue* nxt,Node_Queue* pr)	{		if(p)		{			ptr = new char[strlen(p)+1];			strcpy(ptr,p);		}		else			ptr = 0;		next = nxt;		pre  = pr;	};	Node_Queue* inset(char* p)	{		Node_Queue* o = new Node_Queue(p,this,0);		this->pre = o;		return o;	};	Node_Queue*  del(void)	{		Node_Queue* o = this->pre;		delete this;		return o;	};	~Node_Queue(void)	{		if(pre)			pre->next = this->next;		delete ptr;	};	char* ptr;	Node_Queue* next;	Node_Queue* pre;};class CircleQueue{public:	CircleQueue(int size=10);	void  initffile(char* filepath);	char* getCur(void);	void  incCur(void);	void  devCur(void);	void  inset(char* p);	void  setSize(int size);	void  show(int fid, bool reversFlag);private:	void del(void);private:		Node_Queue* head;	Node_Queue* tail;	Node_Queue* cur;	int num;	int num_cur;};#endif

⌨️ 快捷键说明

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