[英]c++ Boost Multithread how to pass class object to argument
我的班级名称为BasicExcelCell。 当我使用它时,该如何调用
BasicExcelCell* c;
//Normal call
c->TTiTraceParserConv(TTiAsciiTraceOutputDL.GetBuffer(0));
//How to pass it the boost thread argument?
boost::thread t1(&YExcel::BasicExcelCell::TTiTraceParserConv,TTiAsciiTraceOutputDL.GetBuffer(0));
t1.join();
我有几种方法,但是编译时总是出错。 任何建议,我都感激。 我看过Google的一些基本示例。
您缺少要在其上调用成员函数的实例:
This
↓
boost::thread t1(&YExcel::BasicExcelCell::TTiTraceParserConv, c, TTiAsciiTraceOutputDL.GetBuffer(0));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.