void someFunction(double x) { Product expr(new Sum(new Variable(x), new Literal(2)), new Literal(3)); cout << expr.eval() << endl; } End of Listing