HI,
Im building an sample console application..i have attached the source along with the xml file could any one helpme about how to solve this error
Thanks in advance
Printable View
HI,
Im building an sample console application..i have attached the source along with the xml file could any one helpme about how to solve this error
Thanks in advance
Please specify the exact error you encounter en give us the specific code piece the error occurs in.
The first thing you need to do is resolve the build errors - you have at least one starting with #include "iostream.h". You don't want to include this header because you already have the correct <iostream> header included. Next, check out the line:Quote:
Originally Posted by resumurof
Code:bool ret = xmlDoc->load("C://Documents and Settings/admin/Desktop/Feb 19/bslides.Xml");
You'll get a runtime error on this line because paths in windows need backslashes ('\' instead of '/'). Also strings in C treat a backslash as an escape character so you need to double up on this (from '\' to '\\') to end up with:
Code:bool ret = xmlDoc->load("C:\\Documents and Settings\\admin\\Desktop\\Feb 19\\bslides.Xml");
Try to make these changes and then post back and I'll tell you the other problems (there are two more).
TIP: Use w h i t e s p a c e. Indenting and putting whitespace in your code really makes it easier to read.
Consider the statement:
Code:for (inti=0;i<numitems;i++)
It's way more easier to read, with a bit of whitespace
Code:for (int i = 0; i < numitems; i++)
Whitespace is free, so there's no penalty for using it.