bool Operand(char x) { return (x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z'); } string GetInfix(string exp) //Evaluate to infix { StackOFQueue s; for (int i = 0; exp[i] != '\0'; i++) { if (Operand(exp[i])) { string op(1, exp[i]); s.push(op); } else { string op1 = s.top(); s.pop(); string op2 = s.top(); s.pop(); s.push("(" + op2 + exp[i] +op1 + ")"); } } return s.top(); }