【发布时间】:2016-05-08 09:56:24
【问题描述】:
void foo(int n){cout << n << '\n';}
void foo(string s){cout << s << '\n';}
int main(){
thread t1{foo,9};
thread t2{foo,"nine"};
t1.join();
t2.join();
return 0;
}
我收到一个错误
没有匹配的函数调用 std::thread::thread 大括号封闭的初始化列表
【问题讨论】:
标签: c++ multithreading