123
double f(double y){ return std::exp(y)-x; }
123456
//requires C++11/0x support //requires <functional> std::function<double(double)> g(double x) { return [x](double y){return std::exp(y)-x;}; }