#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc uc1; uCalc uc2; auto x1 = uc1.DefineVariable("x = 5"); auto x2 = uc2.DefineVariable("x = 6"); cout << x1.uCalc().Eval("x*10") << endl; // Same as uc1.Eval("x*10") cout << x2.uCalc().Eval("x*10") << endl; // Same as uc2.Eval("x*10") uc1.Release(); // Since x1 is part of uc1, x1 is automatically released as well uc2.Release(); // Since x2 is part of uc2, x2 is automatically released as well // You should no longer use x1 or x2 because they were part of uc1 & uc2 // Don not try x1.uCalc().Eval("x*10"); or x2.uCalc().Eval("x*10"); }