fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x = 5;
  6. cout << x << endl;
  7. auto f = [&]() { x = 16; };
  8. f();
  9. cout << x << endl;
  10. return 0;
  11. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
5
16