【文件属性】:
文件名称:c语言 利用栈实现表达式求解
文件大小:4KB
文件格式:RAR
更新时间:2013-08-09 19:15:05
c语言
#include
#include
#define stack_init_size 100
#define stackincreament 10
#define overflow -2
typedef struct{
char *base;
char *top;
int stacksize;
}Sqstackcha;
typedef struct{
double *base;
double *top;
int stacksize;
}Sqstackdou;
Sqstackcha optr;
Sqstackdou opnd;
char gettop (Sqstackcha &s);
double gettop(Sqstackdou &s);
int precede(Sqstackcha &s,char c);
void initstack(Sqstackcha &s);
void initstack(Sqstackdou &s);
double opterate(double a,char theta,double b);
void push(Sqstackcha &s,char e);
void push(Sqstackdou &s,double e);
char pop(Sqstackcha &s,char e);
double pop(Sqstackdou &s,double e);
void initstack(Sqstackcha &s)
【文件预览】:
include.doc