開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
DEV C++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
Tinyxml
問題(Question):
照下面教學網頁的load xml from a file 第二段程式碼執行發生錯誤
http://www.cs.cmu.edu/~preethi/src/tinyxml/docs/tutorial0.html
PS : A more real-world usage is shown below. This will load the file and display
the contents to STDOUT: 這行字下面的程式碼
餵入的資料(Input):
無
預期的正確結果(Expected Output):
尚不知正確的結果為和
錯誤結果(Wrong Output):
[Error] cannot convert 'TiXmlDocument*'
to 'const char*' for argument '1' to 'void dump_to_stdout(const char*)'
程式碼(Code):(請善用置底文網頁, 記得排版)
// load the named file and dump its structure to STDOUT
void dump_to_stdout(const char* pFilename)
{
TiXmlDocument doc(pFilename);
bool loadOkay = doc.LoadFile();
if (loadOkay)
{
printf("\n%s:\n", pFilename);
dump_to_stdout( &doc ); // defined later in the tutorial
}
else
{
printf("Failed to load file \"%s\"\n", pFilename);
}
}
補充說明(Supplement):
感謝各位耐心看完,自學階段有很多不懂的地方,如有不足還請提醒,謝謝!