So I have to parse an XML file for my C++ project in class and I'm using RapidXML. The rapidxml_iterators.hpp file is giving me some troubles. I'm using Dev C++ by the way
At first, I had the following code:
typedef typename xml_node<Ch> value_type;
typedef typename xml_node<Ch> &reference;
typedef typename xml_node<Ch> *pointer;
typedef std::ptrdiff_t difference_type;
typedef std::bidirectional_iterator_tag iterator_category;
Inside my main.cpp, I did: #include "rapidxml_iterators.hpp" and gave me an expected nested-name specifier error when I tried to compile it. I followed the instructions from compile rapidxml under linux with g++ and changed the code from the top to the following:
typedef xml_node<Ch> value_type;
typedef xml_node<Ch> &reference;
typedef xml_node<Ch> *pointer;
typedef typename std::ptrdiff_t difference_type;
typedef typename std::bidirectional_iterator_tag iterator_category;
Now, it's giving me these errors:
-no class template named ptrdiff_t' in
std'
-ISO C++ forbids declaration of `difference_type' with no type
If anyone has any ideas on how to fix this code, I'd be forever grateful. Thanks in advance!