gem*_*xas 2 c++ multithreading boost
class accel{
public:
accel(int threads, string params);
private:
void getfile(int from, int to);
void download(int threads);
};
void accel::download(int threads){
boost::thread g(&getfile(0, 1)); //<<<<
}
Run Code Online (Sandbox Code Playgroud)
给出错误'&'需要l值.我一直在这样做.如何使它工作?
boost::thread g (boost::bind(&accel::getfile, this, 0, 1));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
524 次 |
| 最近记录: |