Re: how do i convert xml attributes to c++ class using tinyxml
Quote:
Originally Posted by
Jamku
ye ive been running it in debug mode, the output don't give me a line where the error is occurring
I don't know what you expected, but C++ doesn't work that way.
When you debug a C++ program, you practically never get "the line that caused the error". It is your job to then really and truly debug the code by single-stepping through the program, setting breakpoints, watch variables, etc.
Quote:
I followed a tutorial on dinomage to find out how to use tinyxml, i learnt that i can store the attributes into char pointers
You cannot store attributes in char pointers. A pointer is not a storage location for string data. A pointer is an integer value that denotes a position in memory. Nothing more, nothing less. You can use string variables such as what Victor mentioned to store actual strings. Things such as CString, std::string, and others are string types that actually are smart enough to handle entire strings. A pointer has no such capabilities, as again, it is just an integer value.
Regards,
Paul McKenzie
Re: how do i convert xml attributes to c++ class using tinyxml
would like to thank everyone for there help its helping me progress as a programmer, now with the cout's in place i can see whats not loading and its the xml root, this is my first time using any xml parser, so if theres anyone that can maybe point me in the right direction it would be appreciated