multiple parameters in thread
-
i have a function with two parameters , I want to start the thread and want to give the address of that function in the thread.Now my question is how should i pass that function in thread. According to my understanding , i should create a class , there i would create two variables of same type that of parameter list of function , and a function which contains that fucntion implementation .and now create an instance of the class and pass that address in the thread. This seems to be a very lengthy process. Please help. Thanks
-
i have a function with two parameters , I want to start the thread and want to give the address of that function in the thread.Now my question is how should i pass that function in thread. According to my understanding , i should create a class , there i would create two variables of same type that of parameter list of function , and a function which contains that fucntion implementation .and now create an instance of the class and pass that address in the thread. This seems to be a very lengthy process. Please help. Thanks
Nilish wrote:
This seems to be a very lengthy process.
Well, if you can't be bothered writing 6 lines of code, perhaps you're in the wrong business.
Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.
-
i have a function with two parameters , I want to start the thread and want to give the address of that function in the thread.Now my question is how should i pass that function in thread. According to my understanding , i should create a class , there i would create two variables of same type that of parameter list of function , and a function which contains that fucntion implementation .and now create an instance of the class and pass that address in the thread. This seems to be a very lengthy process. Please help. Thanks