2、引用捕获
#include
usingnamespace std;
int main()
{
int i =1024;
cout <<&i << endl;
auto fun1 =[&]{
cout <<&i << endl;
};
fun1();
}
2、引用捕获
#include
usingnamespace std;
int main()
{
int i =1024;
cout <<&i << endl;
auto fun1 =[&]{
cout <<&i << endl;
};
fun1();
}