小编Ar *_*han的帖子

解析树程序错误

我说,在该代码中有一个错误用于解析表达式

"146 C:\ Dev-Cpp\zc''show_tree'的冲突类型111 C:\ Dev-Cpp\zc'show_tree'之前的隐式声明在这里"

请帮忙...

#include<stdio.h>
#include<stdlib.h>

int getOperatorPosition(char);

#define node struct tree1

int matrix[5][5]=
{
    {1,0,0,1,1},
    {1,1,0,1,1},
    {0,0,0,2,3},
    {1,1,3,1,1},
    {0,0,0,3,2}
};
int tos=-1;
void matrix_value(void);
//node create_node(char,*node);void show_tree( node *);
int isOperator(char);

struct tree1
{
    char data;
    node  *lptr;
    node  *rptr;
}
*first;


struct opr
{
    char op_name;
    node *t;
}
oprate[50];

char cur_op[5]= {'+','*','(',')','['};
char stack_op[5]= {'+','*','(',')',']'};

int main()
{
    char exp[10];
    int ssm=0,row=0,col=0;
    node *temp;
    //    clrscr();
    printf("Enter Exp : ");
    scanf("%s",exp);
    matrix_value();
    while(exp[ssm] != …
Run Code Online (Sandbox Code Playgroud)

c

0
推荐指数
1
解决办法
266
查看次数

标签 统计

c ×1