Arithmetic evaluation: Difference between revisions
Content deleted Content added
m →{{header|FutureBasic}}: Update image file |
|||
(One intermediate revision by one other user not shown) | |||
Line 923:
=={{header|C++}}==
{{works with|g++|clang++}}
This version does not require boost.
It works by:
- converting infix strings to postfix strings using shunting yard algorithm
- converting postfix expression to list of tokens
- builds AST bottom up from list of tokens
- evaluates expression tree by performing postorder traversal.
<syntaxhighlight lang="cpp">
#include <iostream>
Line 3,155 ⟶ 3,161:
HandleEvents
</syntaxhighlight>
[[file:Arithmetic
=={{header|Go}}==
|