This is a C++ project that evaluates infix arithmetic expressions by converting them to postfix notation (Reverse Polish Notation) for calculation.
- Converts infix expressions to postfix.
- Evaluates the resulting postfix expression.
- Supports operators:
+,-,*,/,^. - Handles multi-digit and decimal numbers.
- Includes parenthesis handling.
- Error validation for invalid expressions (e.g., unbalanced parentheses, division by zero).
You can compile the project using g++. Make sure you have a C++ compiler compatible with C++11 or higher.
g++ -I include example.cpp src/evaluator.cpp src/posfix-evaluator.cpp -o exampleif linux user could use:
compile.sh
Once compiled, you can run the example program:
./example- Example 1:
- Example 2:
- Add trigonometrics expressions handlers
- Add params support
- Add evaluation by prefix notation

