没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
#include<iostream>
#include<stdlib.h>//添加头文件解决不了‘)’的错误,iostream里包含这两个头文件吗???
#include<malloc.h>
using namespace std;
const int STACK_INIT_SIZE=100;
const int STACKINCREMENT = 10;
//char ch[7]={'+','-','*','/','(',')','#'};//把符号转换成一个字符数组
int f1[7]={3,3,5,5,1,6,0};//栈内元素优先级
int f2[7]={2,2,4,4,6,1,0};//栈外的元素优先级
typedef struct
{
char *base;
char *top;
int stacksize;
}SqStack;
void InitStack(SqStack &S)//question1:&的用法???//经检查正确
{
S.base=(char*)malloc(STACK_INIT_SIZE*sizeof(char));
if(!S.base)exit(0);
S.top=S.base;
S.stacksize=STACK_INIT_SIZE;
}
void Push(SqStack &S,char e)//经检查正确
{
if(S.top-S.base>=S.stacksize)
{
#include<stdlib.h>//添加头文件解决不了‘)’的错误,iostream里包含这两个头文件吗???
#include<malloc.h>
using namespace std;
const int STACK_INIT_SIZE=100;
const int STACKINCREMENT = 10;
//char ch[7]={'+','-','*','/','(',')','#'};//把符号转换成一个字符数组
int f1[7]={3,3,5,5,1,6,0};//栈内元素优先级
int f2[7]={2,2,4,4,6,1,0};//栈外的元素优先级
typedef struct
{
char *base;
char *top;
int stacksize;
}SqStack;
void InitStack(SqStack &S)//question1:&的用法???//经检查正确
{
S.base=(char*)malloc(STACK_INIT_SIZE*sizeof(char));
if(!S.base)exit(0);
S.top=S.base;
S.stacksize=STACK_INIT_SIZE;
}
void Push(SqStack &S,char e)//经检查正确
{
if(S.top-S.base>=S.stacksize)
{
资源评论
- 普通网友2016-12-06请问怎么添加翻译为中辍表达式,并且输出
englishteam
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功