I'm trying to place the function that calls _beginthreadex and the the thread function under the same class, but I get a compilation error:
error C2276: '&' : illegal operation on bound member function expression
Code:
class ScanAction {
public:
void ScanDir(char *root);
private:
unsigned __stdcall LyricsThread(void *params);
};
unsigned __stdcall ScanAction::LyricsThread(void *params)
{
...
}
void ScanAction::ScanDir(char *root)
{
...
_beginthreadex(NULL, 0, &LyricsThread, NULL, 0, &dwChildId);
...
}
The marked part in the code is the part giving me hard time, any idea why?
Please note what the LyricsThread function is outside the class everything works just fine.
Thank you.