Jump to content
  • Advertisement
Sign in to follow this  
Daikenkaiking

TinyXML Get Int Value

This topic is 3801 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I'm pretty new to C++, and I've ran into a bit of a problem. I've got my program set up, the basic loading of config options done using TinyXML ( Meaning, loading them from a XML file :P ). However, I can't figure out how to get an int value. It always returns them as const char. Is there a way to get an int value from TinyXML, and if not, is there a way to convert the content of the char to a int? Thanks. :)

Share this post


Link to post
Share on other sites
Advertisement
I use a modified TinyXml but there is a function for this.
Quote:

int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const


Edit:
here is the online docs for the API which you may find handy
TinyXml

Share this post


Link to post
Share on other sites
Yeah, I have looked through there and found the IntValue() Function in the Attribute class, but alas, I have not figured out how to use it, and theres not much on the page there about it. Can anyone shed some light on this? :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!