Created
March 23, 2017 01:16
-
-
Save redforce01/7da71959784beeda46d0c07276c6258d to your computer and use it in GitHub Desktop.
for my blog gist - thread code #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ThreadPara | |
{ | |
public: | |
void func() | |
{ | |
for(int i = 0; i < 5; i++) | |
std::cout << "ThreadPara Num : " << i << std::endl; | |
} | |
}; | |
ThreadPara thread_para; | |
std::thread myThread(&ThreadPara::func, &thread_para); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment