Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include "pch.h"
  2. #include <iostream>
  3. #include <thread>
  4. #include <chrono>
  5.  
  6. int main()
  7. {
  8.     std::thread th([]()
  9.     {
  10.         std::this_thread::sleep_for(std::chrono::milliseconds(1000));
  11.         std::cout << "privet apcoder" << std::endl;
  12.     });
  13.  
  14.     th.join();
  15.     //th.detach();
  16.  
  17.     std::cout << "paka apcoder" << std::endl;
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement