-
May 9th, 2013, 12:33 PM
#16
Re: how do i convert xml attributes to c++ class using tinyxml
 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.
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
Last edited by Paul McKenzie; May 9th, 2013 at 12:41 PM.
-
May 13th, 2013, 04:08 PM
#17
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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|