:) hi, i am new in programming and now dealing with some multi threading stuff
anyway i got problem when trying to use member function when doing threads
i searched around the net and found that 1 method is by using messages which is rather complex
another method that somebody posted is by casting:
DWORD pg_control::thr ( LPVOID lpvParam ) // static
pg_control *thr = (pg_control*)lpvParam;
// Go on with code ...
AfxBeginThread ( (AFX_THREADPROC)pg_control::thr, (LPVOID)this );}
however i get some errors
C:\Program Files\Microsoft Visual Studio\MyProjects\abc.cpp(222) : error C2440: 'type cast' : cannot convert from '' to 'unsigned int (__cdecl *)(void *)'
None of the functions with this name in scope match the target type
Error executing cl.exe.
AClient.exe - 1 error(s), 0 warning(s)
the problem lies in the red text
can anyone please correct and enlighten me?
- using winxp programming for win98se
- MFC style
- VC++6.0 SP6 :)