I am new to threading and have absolutely no idea why the following error is happening:
c:\program files (x86)\microsoft visual studio 14.0\vc\include\thr\xthread(240): error C2672: 'std::invoke': no matching overloaded function found
This is the code where I create the threads:
thread t1(testNextPasscode, 1, passcode, test, correct);
thread t2(testNextPasscode, 2, passcode, test, correct);
thread t3(testNextPasscode, 3, passcode, test, correct);
thread t4(testNextPasscode, 4, passcode, test, correct);
t1.join();
t2.join();
t3.join();
t4.join();
And here is the function:
void testNextPasscode(int inc, string& passcode, string test, bool& correct) { ... }
It seems that something is wrong in the thread class, but I seriously doubt it. What is going on and how can I fix it?