fork download
  1. #include <iostream>
  2. #include<functional>
  3.  
  4. void Func(int i){
  5. static std::function<void(int)> F = [](int N){
  6. std::cout<<N<<std::endl;
  7. };
  8.  
  9. F(i+1);
  10. }
  11.  
  12.  
  13. int main(){
  14. Func(100);
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 2960KB
stdin
Standard input is empty
stdout
101