I wrote some functions that write out to a xml file no problem. The functions in it are a bit funky, but I am beginning to wrap my head around it. The problem I am having is when I go to open a xml file and read form it.
void getXml(Fighter &inFighter, const char* filename){ TiXmlDocument doc(filename); bool loadOkay = doc.LoadFile(); if (loadOkay) { ... } return;}
The call:
char* filename = "fighter_output2.xml"; getXml(fighterTwo, filename);
The filename is correct (I copy/pasted from Explorer), and is in the same directory as the project, which is where the xml I output earlier in the program is dropped off. LoadFile is failing and returning an error. I have googled and found at least 10 programs that use this exact same syntax, so I cannot figure out where I am going wrong. Is there a VS2008 setting I need to change, or an additional #include (beyond "tinyxml.h") required to access these files?
Any help would be much appreciated, thanks.