#include <iostream>
using namespace std;
int main()
{
int n = 10;
auto f = [n](int v){return v+n;};
cout << f(8) << endl;
return 0;
}
lambda expression capture list demo
最新推荐文章于 2024-01-10 21:40:08 发布
#include <iostream>
using namespace std;
int main()
{
int n = 10;
auto f = [n](int v){return v+n;};
cout << f(8) << endl;
return 0;
}