CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 17

Threaded View

  1. #9
    Join Date
    Apr 1999

    Re: how do i convert xml attributes to c++ class using tinyxml

    Quote Originally Posted by Jamku View Post
    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.


    Paul McKenzie
    Last edited by Paul McKenzie; May 9th, 2013 at 12:41 PM.

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)