我想有創建時,一個類,啓動一個後臺線程,類似於下面:的boost ::類中的線程
class Test
{
boost::thread thread_;
void Process()
{
...
}
public:
Test()
{
thread_ = boost::thread(Process);
}
}
我不能得到它來編譯,錯誤是「調用boost :: thread :: thread(未解析函數類型)時沒有匹配函數」。當我在課外做這件事時,它工作正常。我怎樣才能讓函數指針起作用?