stackqueue.h
来自「这是俺编写的一个堆栈」· C头文件 代码 · 共 54 行
H
54 行
/************************************************************************/
/* StackQueue.H */
/************************************************************************/
#ifndef __STACKQUEUE_H__
#define __STACKQUEUE_H__
//////////////////////////////////////////////////////////////////////////
//Stack
//////////////////////////////////////////////////////////////////////////
#define MaxSize 100
template<class T>
struct StackType
{
T Stack[MaxSize];
int top;
} ;
template<class T>
struct StackLType
{
T Data;
StackLType *next;
};
//////////////////////////////////////////////////////////////////////////
//Queue
//////////////////////////////////////////////////////////////////////////
template<class T>
struct QueueType
{
T Queue[MaxSize];
int front,rear;
};
template<class T>
struct Qnode
{
T Data;
Qnode<T> *next;
};
template<class T>
struct QueueLType
{
T Data;
Qnode<T> *front;
Qnode<T> *rear;
};
#ifndef __STACKQUEUE_CPP__
#include "StackQueue.cpp"
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?