threads of an Object?

i want to make an Object Test to control many threads.

Test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
class Test{
	public:
		Test();
		void exampleThread(void*);
};

Test::Test(){
	_beginthread(exampleThread, 0, 0);
}

void Test::exampleThread(void* ptr){
	...
}


i get the error

argument of type `void (Test::)(void*)' does not match `void (*) (void*)'


what must i write so that i can make an Object control many threads?

thanks.
The thread main function cannot be a member function with a "this" pointer.
The typical solution is to make exampleThread static, then pass "this" as
a void* to the function.

Topic archived. No new replies allowed.