#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Transformer t; // Rule to find quantity and price, then calculate total. // Note the explicit Double() conversion for the captured text variables. t.FromTo("Qty: {@Number:qty}, Price: {@Number:price}", "{@Self}, Total: {@Eval: Double(qty) * Double(price)}"); auto invoice = R"(Item: Book, Qty: 3, Price: 15.00 Item: Pen, Qty: 10, Price: 1.50)"; cout << t.Transform(invoice) << endl; }