jcsque.h

来自「C++编写的词组匹配的小程序」· C头文件 代码 · 共 30 行

H
30
字号
// JCSQue.h Begin
/* Jon Martin:This is a queue of pointers to TREENODE.This is a basic circular queue structure which acts as a helper to the main() function of the program in order to solve for the shortest path. */

#ifndef JCSQUE_H
#define JCSQUE_H
#include <iostream.h>
#include <fstream.h>
#include <string.h>
#include "JBSTree.h"
typedef TREENODE *QUENODE;
class JCSQue
{
public:	
    JCSQue();    
	JCSQue(int n);
	JCSQue(const JCSQue& anotherQue);	// Copy constructor	
	~JCSQue();
    void MakeEmpty();    
    bool IsFull() const;    
    bool IsEmpty() const;
	void enqueue(QUENODE a);
	void dequeue(QUENODE& a);
	void operator =(const JCSQue& originalQue);
private:	
	int MAX_ITEMS;
    int front, rear;    
	QUENODE *items;  // array of pointers to TREENODE 
};
#endif

⌨️ 快捷键说明

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