Advertisement
Guest User

Untitled

a guest
Nov 7th, 2011
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <thread>
  3.  
  4. class testClasse {
  5. std::thread traad;
  6. public:
  7. void cout()
  8. {
  9. for(int i;i<2000;i++)
  10. std::cout<<"passser"<<std::endl;
  11. }
  12. void start(void)
  13. {
  14. traad(cout);
  15. }
  16. void stop(void)
  17. {
  18. traad.join();
  19. }
  20.  
  21. };
  22.  
  23.  
  24. int main()
  25. {
  26. testClasse test;
  27. test.start();
  28. test.stop();
  29. return 0;
  30. }
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement