May 9th, 2013, 01:33 PM
Re: how do i convert xml attributes to c++ class using tinyxml
I don't know what you expected, but C++ doesn't work that way.
Originally Posted by Jamku
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.
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.
I followed a tutorial on dinomage to find out how to use tinyxml, i learnt that i can store the attributes into char pointers
Last edited by Paul McKenzie; May 9th, 2013 at 01:41 PM.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.