main() { long int value; top=-1; printf("Enter infix : "); gets(infix); infix_to_postfix(); printf("Postfix : %s\n",postfix); value=eval_post(); printf("Value of expression : %ld\n",value); }/*End of main()*/
int main() { long int value; top=-1; clrscr(); printf("Enter the postfix expression\n"); gets(infix); infix_to_postfix(); printf("Postfix =%s\n",postfix); value=eval_post(); printf("Value of expression:%ld\n",value); return 0; }
int post_eval(const char * expr) { std::vector<token> tokens; parse(expr, tokens); return eval_post(tokens); }