求解:栈的初始化遇到的问题(error C2100: 非法的间接寻址)
											大家看看,我是按照书上的代码敲上去的。没有错误,但是编译提示下列错误,求解:::


 程序代码:
程序代码:#define STACK_INIT_SIZE 100;     //存储空间初始分配量
#define STACKINCREMENT  10;
typedef int SElemType;
typedef struct {     //栈的结构定义
   SElemType * base;     //构造之前和销毁之后,base的值为NULL
   SElemType * top;      //栈顶指针
   int stacksize;        //当前分配的存储空间,以元素为单位
}SqStack;
Status InitStack (SqStack &S)    //初始化栈
{
    S.base=(SElemType *)malloc (STACK_INIT_SIZE * sizeof(SElemType));   //错误均指向了这行,三个。
   if(!S.base)   exit (OVERFLOW);    //存储分配失败
   S.top=S.base;                
   S.stacksize=STACK_INIT_SIZE;
   return OK;
}//InitStack下面是错误提示:::
1>实验六(树).cpp
1>c:\users\pang1567\documents\visual studio 2008\projects\c数据结构实验\c数据结构实验\第6章\lab_6.h(18) : error C2143: 语法错误 : 缺少“)”(在“;”的前面)
1>c:\users\pang1567\documents\visual studio 2008\projects\c数据结构实验\c数据结构实验\第6章\lab_6.h(18) : error C2100: 非法的间接寻址
1>c:\users\pang1567\documents\visual studio 2008\projects\c数据结构实验\c数据结构实验\第6章\lab_6.h(18) : error C2059: 语法错误 : “)”
1>c:\users\pang1567\documents\visual studio 2008\projects\c数据结构实验\c数据结构实验\第6章\lab_6.h(18) : error C2143: 语法错误 : 缺少“)”(在“;”的前面)
1>c:\users\pang1567\documents\visual studio 2008\projects\c数据结构实验\c数据结构实验\第6章\lab_6.h(18) : error C2100: 非法的间接寻址
1>c:\users\pang1567\documents\visual studio 2008\projects\c数据结构实验\c数据结构实验\第6章\lab_6.h(18) : error C2059: 语法错误 : “)”

[ 本帖最后由 pang1567 于 2011-4-29 19:05 编辑 ]

 
											





 
	     
										
					
	