XML help
Posted: Mon Dec 12, 2005 1:51 am
I wrote this function to get a xml file based on a game name...
But it gives me this error in VC++6
Code: Select all
void getGameInfo(stringw gamename, IGUIEnvironment &ev){
stringw file = L"./games/";
file += gamename.c_str();
file += "/";
file += gamename.c_str();
file += ".xml";
IXMLReader *xml = device->getFileSystem()->createXMLReader(file.c_str());
while(xml && xml->read()){
switch(xml->getNodeType()){
case EXN_ELEMENT:
{
stringw developer = xml->getAttributeValue(L"developer");
stringw version = xml->getAttributeValue(L"version");
ev.addMessageBox(gamename.c_str(),L"Developed By: " + developer + " Version: " + version);
break;
}
}
}
C:\Documents and Settings\rcapote\Desktop\RedeemedArcade\source\RedeemedArcade.cpp(31) : error C2664: 'class irr::io::IIrrXMLReader<unsigned short,class irr::IUnknown> *__thiscall irr::io::IFileSystem::createXMLReader(const char *)' : cannot convert
parameter 1 from 'const unsigned short *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\rcapote\Desktop\RedeemedArcade\source\RedeemedArcade.cpp(39) : error C2677: binary '+' : no global operator defined which takes type 'class irr::core::string<unsigned short>' (or there is no acceptable conversion)