【发布时间】:2011-11-28 03:31:40
【问题描述】:
我正在尝试创建一个在创建时启动后台线程的类,类似于以下内容:
class Test
{
boost::thread thread_;
void Process()
{
...
}
public:
Test()
{
thread_ = boost::thread(Process);
}
}
我无法编译,错误是“No matching function for call to boost::thread::thread(unresolved function type)”。当我在课堂外这样做时,它工作正常。如何让函数指针工作?
【问题讨论】:
标签: c++ boost-thread