Relative paths not set at debugging, Why?
I retrieve the values using simple C++ code to check the assigned values of XML Loader an开发者_如何学JAVAd load the XML scenario file by setting relative path like this.
"loader.LoadXMLScenarioFile("relative path");"
But when debugging loader doesn't load the value if we are not setting up the absolute path. But its successfully write the values to text file and it's works correctly. Why it is happen?
Since you are using VS2008 you should double check your debug settings. Especially the path settings for the debugger.
Look at Properties->Configuration Properties->Debugging. Is the working directory really what you expect for your relative path? By default it is set $(ProjectDir) which is not the directory where your executable is.
精彩评论