#include #include #include #include #include using namespace std ; int main() { int num1 = 1; int num2 = 2; auto lambda1Obj = [] (int a, int b) { return a + b; } ; cout << "lambda1Obj invoked: " << lambda1Obj( 5,6) << endl ; //invoked right away auto sum = [] (int a, int b) { return a + b; } (num1, num2); cout << "The sum of " << num1 << " and " << num2 << " is " << sum << endl ; }