Download the new version from the http://sourceforge.net/projects/tinyxml/ and copy the six files to the project tinystr. h tinyxml. h tinystr. cpp tinyxml. cpp tinyxmlerror. cpp tinyxmlparser. cpp
Add # include "stdafx. H" to the header of the CPP file, where you want to use # include "tinyxml. H"
Wchar_t * commtools: u8tounicode (const char * szu8) {int wcslen =: multibytetowidechar (cp_utf8, null, szu8, strlen (szu8), null, 0 ); wchar_t * wszstring = new wchar_t [wcslen + 1];: multibytetowidechar (cp_utf8, null, szu8, strlen (szu8), wszstring, wcslen ); wszstring [wcslen] = '\ 0'; return wszstring;
}
Cstringa commtools: cstringtocstringa (cstring Str)
{// Convert a tchar string to a lpcstr ct2ca pszconvertedansistring (STR); // construct a STD: string using the lpcstr input cstringa result (pszconvertedansistring); return result ;}
If the value of the gettext node is null, null is returned. You can determine the value before gettext.
If (cityidele-> gettext ()! = NULL) wcscpy_s (cityinfolist [itmpc]. CID, commtools. u8tounicode (cityidele-> gettext (); else
Wcscpy_s (cityinfolist [itmpc]. CID, l "");