How this function call auto “f = [](int b)” possible?

前端 未结 0 1230

I have following program and shows the sum as 5.

int a = 1;
int main() {
auto f = [](int b) { return a + b; };
std::cout << f(4);

}

相关标签:
回答
  • 消灭零回复
提交回复
热议问题