Using C++11, XMLUtil::ToErrorName(XMLError) returns the name of error type
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index 9e310de..fd9ef16 100755
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -476,6 +476,14 @@
     return false;

 }

 

+std::string XMLUtil::ToErrorName( const XMLError errorID )

+{

+#if __cplusplus  > 199711LL

+    return ErrorNames[errorID];

+#else

+    return std::string("Use C++11 or higher to use this function");

+#endif

+}

 

 char* XMLDocument::Identify( char* p, XMLNode** node )

 {