c++笔记3

1,多线程概论    2,std::ref()将值转为引用,std::cref()将值转为常引用 第一种:不推荐    int ca = 5;      int& cca = ca;     thread ttt(testC, std::ref(ca));//可以   //thread ttt(testC, cca);//不可以 第二种:推荐 thread ttt([&] {testC(ca);
相关文章
相关标签/搜索