mardi 29 septembre 2015

Error C3867 Multithreading C++

I'm trying to create multiple threads to handle clicking tasks. Now Visual Studio 2015 doesn't display syntax error, however upon compiling I get the error

C3867 'action::Chrome::click': non-standard syntax; use '&' to create a pointer to member

int main()
{
    std::unique_ptr<action::Chrome>chrome(new action::Chrome());
    const std::vector<uint_16>xLocation = { 1155, 1165, 1205, 1245, 1285 };
    std::vector<uint_16>yLocation;

    //Fill yLocation
    //Yada yada, other code

    std::thread task[6];
    for(uint_8 i = 0; i < 6; i++)task[i] = std::thread((chrome->click, xLocation, yLocation[i]));
    for(uint_8 i = 0; i < 6; i++)task[i].join();
}

Aucun commentaire:

Enregistrer un commentaire