提交 c299e638 创建 作者: 宋海霞's avatar 宋海霞

modify

上级 46712a44
......@@ -3,32 +3,32 @@
//
// 在此处包含 C 标准库头文件
// Include the C standard library header file here
//
#include <stdio.h>
//
// 在此处包含其他头文件
// Other header files are included here
//
#include "Stack.h"
//
// 在此处定义数据结构
// Define the data structure here
//
#define MAX_NUMBER 50
typedef struct CSNode{
char data; // 节点数据
struct CSNode *firstchild; // 孩子节点
struct CSNode *nextsibling; // 兄弟节点
char data; // Node data
struct CSNode *firstchild; // Child Node
struct CSNode *nextsibling; // Brother Node
}CSNode, *CSTree;
//
// 在此处声明函数
// Declare the function here
//
CSTree InitTree();
......@@ -40,7 +40,7 @@ void DeleteTree(CSTree pTree);
void OutputResult();
//
// 在此处声明全局变量
// Declare global variables here
//
extern Stack stack;
......
......@@ -3,34 +3,34 @@
//
// 在此处包含 C 标准库头文件
// Include the C standard library header file here
//
//
// 在此处包含其他头文件
// Other header files are included here
//
//
// 在此处定义数据结构
// Define the data structure here
//
#define MAX_STACK_LENGTH 64 // 栈的最大长度
#define MAX_STACK_LENGTH 64 // Maximum length of stack
//
// Stack
struct CSNode;
typedef struct Stack{
struct CSNode* buffer[MAX_STACK_LENGTH]; // 栈的缓冲区
int top; // 指示栈顶的位置,而不是栈中元素的个数
struct CSNode* buffer[MAX_STACK_LENGTH]; // Stack buffer
int top; // Indicates the position at the top of the stack, not the number of elements in the stack
}Stack;
//
// 在此处声明函数
// Declare the function here
//
void InitStack(Stack* pS);
......@@ -40,7 +40,7 @@ int StackEmpty(Stack* pS);
//
// 在此处声明全局变量
// Declare global variables here
//
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论