typedef char element;
typedef struct node *treePointer ;
typedef struct node {
element data ;
treePointer leftChild, rightChild ;
} node ;
node *stack;
int top;
int capacity;
Creat stack(int max_stack_size)
{
MALLOC( stack,sizeof(element) * max_stack_size,element*);
top = -1;
capacity = max_stack_size;
这是我创建栈的一部分,但是老是提示错误:
see previous definition of 'MAX_STACK_SIZE'
E:\数据结构\树的创建.cpp(24) : error C2146: syntax error : missing ';' before identifier 'stack'
E:\数据结构\树的创建.cpp(24) : error C2501: 'Creat' : missing storage-class or type specifiers
E:\数据结构\树的创建.cpp(24) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
