挨拶
私はboost ptree
いくつかの情報を取得するために使用します。
typedef ptree MInfo;
私のアプリケーションでは、次のスタイル.put
または.get
情報を myに使用します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
ます。
何か案が ?!