#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // Create a uCalc object on the stack. uCalc myCalc; // Flag it as 'owned' to enable automatic cleanup. myCalc.Owned(); myCalc.DefineVariable("x=10"); cout << "Evaluating in scope: " << myCalc.Eval("x*2"); // When 'myCalc' goes out of scope at the end of the block, // its destructor is called, which automatically calls Release(). }