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

📄 stackqueue.h

📁 文件中是我编写的两个数据结构
💻 H
字号:
/************************************************************************/
/*                          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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -