【发布时间】:2013-10-05 07:49:17
【问题描述】:
问候
我使用boost ptree 来获取一些信息,也需要一段时间。
typedef ptree MInfo;
在我的应用程序中,我使用以下样式将.put 或.get 信息输入我的MInfo。
a_info.put<WORD>(PathTree(SStatus)(fwDevice).str(), s_status->fwDevice);
WORD y = a_info.get<WORD>(PathTree(SStatus)(fwSensors)(S_SWITCH).str());
在我的新方法中,我使用相同的结构将信息放在我的 ptree 上以便稍后获取。
HRESULT SBase::getPortStatusEvent(AInfo &a_info, LPARAM lParam)
{
...
using namespace boost::property_tree;
a_info.put<WORD>(PathTree(SEvent)(wPortType).str(), port_Status->wPortType); //This Line Cause the Error!!
a_info.put<WORD>(PathTree(SEvent)(wPortIndex).str(), port_Status->wPortIndex); //This Line Cause the Error!!
a_info.put<WORD>(PathTree(SEvent)(wPortStatus).str(), port_Status->wPortStatus); //This Line Cause the Error!!
....
return WFS_SUCCESS;
}
a_info.put 出现错误。
有什么想法吗?!
【问题讨论】:
标签: multithreading visual-c++ boost ptree