From what I have looked up, my syntax is correct but my compiler (VS2015) is complaining. Note, I'm using namespace ee with the class Network. Here's the code
//code that doens't work
thread clientThread(&ee::Network::clientRun, new ee::Network);
*note: in the real code I'm not calling new as an argument, I did it here to shorten code.
I've tested the functions and they work, I just can't get them to work using thread. Here is their signatures.
void serverRun();
void clientRun();
void clientRun(string ip);
My errors are:
Error C2661 'std::thread::thread': no overloaded function takes 2 arguments
abc no instance of constructor "std::thread::thread" matches the argument list
Does anyone have any insight as to what might be happening in this situation?