C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
using vector and boost property tree get() method Posted by sudhakarmandal on 4 Aug 2011 at 7:12 AM
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<unsigned char> value using ptree (boost property tree) by typecasting as follows.
const std::vector<unsigned char> Result = pti.get<std::vector<unsigned char>>("XmlMsg.MsgDevice.MsgCommand.resultElement");

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

mdi_boost_1_46_1\boost\property_tree\stream_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_protocol\mdi\mdi_boost_1_46_1\boost\property_tree\stream_translator.hpp(35) : while compiling class-template member function 'void boost_1_46_1::property_tree::customize_stream<Ch,Traits,E>::extract(stlpd_std::basic_istream<_CharT,_Traits> &,E &)'
with
[
Ch=char,
Traits=stlpd_std::char_traits<char>,
E=stlpd_std::vector<unsigned char>,
_CharT=char,
_Traits=stlpd_std::char_traits<char>
]
==============
_boost_1_46_1\boost\property_tree\stream_translator.hpp(190) : see reference to class template instantiation 'boost_1_46_1::property_tree::customize_stream<Ch,Traits,E>' being compiled
with
[
Ch=char,
Traits=stlpd_std::char_traits<char>,
E=stlpd_std::vector<unsigned char>
]





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.