RapidXML Vector Datatype
In all examples that I have found of others using RapidXML, everyone
always reads data into a vector of char's like so:
vector<char> buffer((istreambuf_iterator<char>(theFile)),
istreambuf_iterator<char>());
There must be a reason for this because when I try to change it to a
vector of std::string's I get a screen full of errors with this being the
first error:
error: invalid conversion from 'void*' to
'std::istreambuf_iterator<std::basic_string<char> >::streambuf_type* {aka
std::basic_streambuf<std::basic_string<char>,
std::char_traits<std::basic_string<char> > >*}'
Is there a way to use std::string and if not why?
No comments:
Post a Comment