KamilStachera / EvalCpp

Eval implemented in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EvalCpp

How to use

Just put the "eval.cpp" and "eval.h" in your project directory, then include header file:

#include "eval.h"

After that, you simply create Eval object (passing the expression string in constructor) and call makeEvaluation function

std::string expression = "3 * (3 + 3)";
auto eval = new Eval(expression);
auto value = eval->makeEvaluation();

You can also dowload this whole repository (it was made in VS17) to run given examples.

TODO

  • more tests
  • custom to_string method (standard library one has too small precision)

About

Eval implemented in C++


Languages

Language:C++ 100.0%