fork download
  1. #include <iostream>
  2. #include <chrono>
  3. #include <future>
  4.  
  5.  
  6. void sample(void)
  7. {
  8. std::cout << sample;
  9. }
  10.  
  11. int main()
  12. {
  13. using namespace std;
  14.  
  15. auto f = async(sample);
  16. f.get();
  17.  
  18. return 0;
  19. }
  20.  
Runtime error #stdin #stdout #stderr 0s 3036KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'std::system_error'
  what():  Unknown error 4294967295