【发布时间】:2015-09-29 09:01:31
【问题描述】:
我正在尝试创建多个线程来处理点击任务。现在 Visual Studio 2015 不显示语法错误,但是在编译时出现错误
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();
}
【问题讨论】:
-
可以发
action::Chrome::click的声明吗?
标签: c++ multithreading c++11