c·c++/c 프로그래밍 314

infix to postfix and eval (중위표현을 후위표현으로 바꾸고 값 구하기)

#include <stdio.h> #include <stdlib.h> #include<string.h> #define MAX_STACK_SIZE 100 typedef char element; typedef struct{ element stack[MAX_STACK_SIZE]; int top; } StackType; void init(StackType *s) { s->top = -1; } int is_empty(StackType *s){ return (s->top == -1); } int is_full(StackType *s){ return (s->top==(MAX_STACK_SIZE-1)); } void push(StackT..