I am trying to invoke a function from a new thread. The function takes a bunch of parameters.
std::thread signingThread(curlWrapper->SendDataToServer,username, password, serverURL, data);
Here is the function protoype
int LibCurlWrapper::SendDataToServer(const std::string& username, const std::string& password, const std::string& serverURL, const std::vector<unsigned char> &vData)
Compiler Error
error: no matching function for call to 'std::thread::thread(, std::string&, std::string&, std::string&, std::vector&)' std::thread signingThread(curlWrapper->SendDataToServer,username, password, serverURL, data);
curlWrapper->SendDataToServeris nonsense, that's not valid C++. There are hundreds of questions on StackOverflow about launching astd::threadto run a member function.curlWrapper->SendDataToServerin a function call if you follow it with an argument list, but you didn't do that. You need to construct the thread with a pointer-to-member-function that refers to the member function and with a pointer/reference to the object to call the function on. Here's one example of an existing question: stackoverflow.com/questions/10673585/…