stack.h

来自「包括栈的pushpop,计数」· C头文件 代码 · 共 31 行

H
31
字号
#include <iostream.h>
#include <stdlib.h>
typedef char* ElementType;

struct Stack
{
	ElementType *base;
	int top;
	int StackSize;
};

void InitStack (Stack *S, int MaxSize);

void DestroyStack (Stack *S);

void ClearStack(Stack *S);

bool Empty(Stack S);

int StackLength(Stack S);

bool GetTop(Stack S,ElementType &e);

bool Push(Stack *S,ElementType e);

bool Pop(Stack *S,ElementType &e);

void Dec2Oct(int Dec);

void Invert();

⌨️ 快捷键说明

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