int main() { for(int i = 0; i < 100; ++i) { add([i] { std::count << i; }); } // and now remove the lambda that prints 3. }
Standard input is empty
prog.cpp: In lambda function: prog.cpp:3:19: error: 'count' is not a member of 'std' prog.cpp: In function 'int main()': prog.cpp:3:37: error: 'add' was not declared in this scope
Standard output is empty