Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <cstdio>#include <stack>#include <map>using namespace std;int current_number = 0;void process_a_digit(char ch) {current_number = current_number * 10 + (ch - '0');}map<char, int> precedence;stack<int> number_stack;stack<char> operator_stack;void calculate_a_num() {int num2 = number_stack.top(); number_stack.pop();int num1 = number_stack.top(); number_stack.pop();char op = operator_stack.top(); operator_stack.pop();int num = 0;switch (op) {case '+':num = num1 + num2; break;case '-':num = num1 - num2; break;case '*':num = num1 * num2; break;case '/':num = num1 / num2; break;}number_stack.push(num);}int get_precedence(char op1, char op2) {if (op1 == '(' || op2 == '(') {