Minimal calculator for simple math expressions in C++11
The following operators are supported: / * - +
BasedOn:
- std::string
- std::vector
- js like split/join
- function overloading
- preprocessor macros
Benefits:
- no dependency
- small code //37 lines, 1.8 KB
- no compile time overhead
- no link time overhead
For more complex calculations look at exprtk: http://www.partow.net/programming/exprtk/index.html