Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <thread>
- class testClasse {
- std::thread traad;
- public:
- void cout()
- {
- for(int i;i<2000;i++)
- std::cout<<"passser"<<std::endl;
- }
- void start(void)
- {
- traad(cout);
- }
- void stop(void)
- {
- traad.join();
- }
- };
- int main()
- {
- testClasse test;
- test.start();
- test.stop();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement