nlist.h
来自「采用模版函数对数据结构的线性列表和栈以及队列进行编程。」· C头文件 代码 · 共 63 行
H
63 行
/****************************************************************************************************/
/****************************************NList.h**************************************************/
/****************************************************************************************************/
#ifndef _NLIST_H_
#define _NLIST_H_
//////////////////////////////////////////////////////////////////////////
///Order List
//////////////////////////////////////////////////////////////////////////
#define MaxSize 100
template<class T>
struct OList
{
T list[MaxSize];
int size;
};
//////////////////////////////////////////////////////////////////////////
//Single List
//////////////////////////////////////////////////////////////////////////
template<class T>
struct SNode
{
T Data;
SNode<T> *next;
};
//////////////////////////////////////////////////////////////////////////
//Double Head List
//////////////////////////////////////////////////////////////////////////
template<class T>
struct DNode
{
T Data;
DNode<T> *left;
DNode<T> *right;
};
//////////////////////////////////////////////////////////////////////////
//Single Circle List
//////////////////////////////////////////////////////////////////////////
template<class T>
struct CNode
{
T Data;
CNode<T> *next;
// CNode<T> *chead;//,*ctail
};
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//All kinds of List operators function include NList.cpp files
//////////////////////////////////////////////////////////////////////////
#if !defined (_NLIST_CPP_)
#include "NList.cpp"
# endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?