fork(2) download
  1. #include <iostream>
  2. #include <thread>
  3. #include <vector>
  4.  
  5. void foo()
  6. {
  7. std::cout << "Hello\n";
  8. return;
  9. }
  10.  
  11. int main()
  12. {
  13. std::vector<std::thread> vecThread;
  14. vecThread.emplace_back(foo);
  15. vecThread[0].join();
  16. }
Runtime error #stdin #stdout 0s 3028KB
stdin
Standard input is empty
stdout
Standard output is empty