다음 응용 프로그램은 첫 줄에 액세스 위반이 있습니다. 그 이유는 무엇입니까?한 줄에 오류가 있습니다. Xerces 프로그램
// test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <xercesc/util/XMLString.hpp>
using namespace xercesc;
int main()
{
XMLCh* path= XMLString::transcode("test.xml");
return 0;
}
[편집] 다음 코드는 나에게 XMLFormatTarget 라인에 예외를 제공합니다,하지만 난에서 문자열을 변경하는 경우 : "test.xml의"에 "C /test.xml을"그것을 잘 작동합니다.
// test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/framework/LocalFileFormatTarget.hpp>
using namespace xercesc;
int main()
{
XMLPlatformUtils::Initialize();
XMLFormatTarget *formatTarget = new LocalFileFormatTarget("C:/test.xml");
return 0;
}
정상 검사와 마찬가지로 XMLString :: transcode()에 대한 호출을 제거해도 충돌이 발생합니까? – WildCrustacean