using vector and boost property tree get() method - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

using vector and boost property tree get() method

I am trying to use vector and boost property tree get() method but i am getting compile errors as follows. could you please help me in resolving these errors.

I am trying to get an std::vector value using ptree (boost property tree) by typecasting as follows.
const std::vector Result = pti.get>("XmlMsg.MsgDevice.MsgCommand.resultElement");

But I am getting the following errors: Please let me know how to resolve them.

mdi_boost_1_46_1oostproperty_treestream_translator.hpp(36) : error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'stlpd_std::vector<_Tp>' (or there is no acceptable conversion)
with
[
_Tp=unsigned char
]
z:MDI_protocolmdimdi_boost_1_46_1oostproperty_treestream_translator.hpp(35) : while compiling class-template member function 'void boost_1_46_1::property_tree::customize_stream::extract(stlpd_std::basic_istream<_CharT,_Traits> &,E &)'
with
[
Ch=char,
Traits=stlpd_std::char_traits,
E=stlpd_std::vector,
_CharT=char,
_Traits=stlpd_std::char_traits
]
==============
_boost_1_46_1oostproperty_treestream_translator.hpp(190) : see reference to class template instantiation 'boost_1_46_1::property_tree::customize_stream' being compiled
with
[
Ch=char,
Traits=stlpd_std::char_traits,
E=stlpd_std::vector
]


Sign In or Register to comment.