vector<int> myv;
myv.push_back(19);
myv.push_back(18);
myv.push_back(17);
myv.push_back(16);
int x = 10;
int y = 11;
auto func = [&x,&y](int a) {a = a + x; y = 33;cout << a << endl;};
for_each(myv.begin(), myv.end(), func);
for_each(myv.begin(), myv.end(), [=](int a) {cout << a +y << endl;});
return 0;
int a = 10;
auto func = [a](int x)mutable->int {a = 9;return x + a;};
cout << func(2) << ";;"<<a << endl;
return 0;