I have this class
class ConnectionManager()
{
public:
void Receive(); /* This method uses variables from this class */
}
void _tmain()
{
ConnectionManager* m_pConnectionManager = new ConnectionManager();
/* the thread should be called here */
}
How do I create a thread that uses the receive method from the m_pConnectionManager object? I can't seem to figure it out with the other questions on Stackoverflow. I tried with this but it doesn't work:
std::thread receiveThread(&ConnectionManager::Receive);
I get this error:
error C2064: term does not evaluate to a function taking 0 arguments c:\program files (x86)\microsoft visual studio 11.0\vc\include\functional