VincentP
Programmer
- Apr 1, 2001
- 116
I am just learning how to use threads, and the compiler throws an error I can't figure how to solve...
In my document class (SDI application), I have the following function:
UINT CMyDoc::ThreadPseudo(LPVOID pParam)
{
// do stuff, but I don`t use pParam, only member variables of CMyDoc
return 0;
}
In another of my Doc methods, I have the following:
m_pThread = AfxBeginThread( ThreadPseudo, NULL );
where m_pThread is a CWinThread * member variable.
The compiler throws the following error:
error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int (void *)'
Every example I can find seems to indicate I am doing this the right way... Can anybody help me?
Vincent
In my document class (SDI application), I have the following function:
UINT CMyDoc::ThreadPseudo(LPVOID pParam)
{
// do stuff, but I don`t use pParam, only member variables of CMyDoc
return 0;
}
In another of my Doc methods, I have the following:
m_pThread = AfxBeginThread( ThreadPseudo, NULL );
where m_pThread is a CWinThread * member variable.
The compiler throws the following error:
error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int (void *)'
Every example I can find seems to indicate I am doing this the right way... Can anybody help me?
Vincent