What I am doing is the following:
- Receiving an expression
- Instantiating Variables
- Convert the expression from infix to postfix
- Evaluate the expression.
Now, in my evaluate function the following operators are working:
+ - * / and ^
I am having trouble to get the following to work: sqrt, abs, and log. Because 'sqrt' is 4 characters long and I am only searching for [i] in my string which is one character. I assume if you can get one of these 3 to work then you can get all 3 to work. So if you can give me advice on how to get this to work I will really appreciate it.
I dont know if I should provide you the code because it is 300 lines.