Re: [xml] Small Problem with libxml2 & MSVC++



'list' is one of the standard container templates in STL. By the time
the compiler parses valid.h, the 'list' is allready a C++ template and
what you see is the result of using a name of the template as a
function parameter name.
...
Lastly, it is always a good practice... no it is even imperative to
include C headers before C++ headers, if you use C libraries in a C++
program. Include libxml, then include STL. That is the only long-term
solution. Modifying libxml headers will help with libxml, but not with
any other useful C library you might want to employ in the future.

Alternatively leave the STL stuff in the std:: namespace, i.e. don't add
the
'using namespace std'.  Thats why its there, to avoid conflicts.

#include <list>

void main() {
      int list; /* no problem here */
      std::list<char> list2;
}







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]