【文件属性】:
文件名称:魔王语言和异或译码(源码)
文件大小:3KB
文件格式:RAR
更新时间:2015-11-20 15:19:26
魔王语言 数据结构实验 译码
代码注释详细,可供参考。
typedef char SElemType,QElemType;
typedef struct{
SElemType *base;
SElemType *top;
int StackSzie;
}SqStack;
bool InitStack(SqStack *s);//初始化一个栈
void AllInStack(char* ch,SqStack s,int t);//所有元素按从右至左的顺序入栈
void DestroyStack(SqStack *s);//释放栈
int StackLength(SqStack *s);//栈得长度
bool StackEmpty(SqStack *s);//检测栈是否为空
void ClearStack(SqStack *s);//清空栈
bool GetTop(SqStack *s,SElemType &e);//获取栈顶元素
bool Push(SqStack *s,SElemType &e);//入栈
bool Pop(SqStack *s,SElemType &e);//出栈
bool Del(SqStack &S);//删除栈顶元素
typedef struct{
QElemType *base;
int front;
int rear;
}SqQueue;
bool InitQueue(SqQueue *Q);//初始化队列
int QueueLength(SqQueue *Q);//队列长度
bool EnQueue(SqQueue *Q,QElemType &e);//入队
bool DeQueue(SqQueue *Q,QElemType &e);//出队
#define BUFFSIZE 512 //缓存大小
#define ADDBUFFSIZE 64 //重新分配缓冲区时应当加的大小
#define min(a,b) (((a)<(b)) ? (a):(b))
#define MAX_PATH 256
【文件预览】:
魔王语言和异或译码.cpp