#include<bits/stdc++.h>
using namespace std;
auto fnc = [&]()->void{
cout << "HELLO WORLD";
return;
};
int main()
{
fnc();
return 0;
}
ERROR OCURRED WHILE BUILDING THIS C++ CODE: non-local lambda expression cannot have a capture-default
But when i remove the ampersand from capture list the code is running pretty fine.