fork download
  1. #include<future>
  2. #include<iostream>
  3.  
  4. int main()
  5. {
  6. auto a = std::async([]()
  7. {
  8. std::cout << 42 << std::endl;
  9. });
  10. a.get();
  11. return 0;
  12. }
  13.  
Runtime error #stdin #stdout 0s 2976KB
stdin
Standard input is empty
stdout
Standard output is empty