Listing 7: Wrapping variables into objects of type Variable

void someFunction (double x) 
{
  Variable v = x;
  cout << ((v + 2) * 3).eval() << endl;
}
— End of Listing —