fork download
  1. int main() {
  2. for(int i = 0; i < 100; ++i) {
  3. add([i] { std::count << i; });
  4. }
  5. // and now remove the lambda that prints 3.
  6. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty