Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

TinyXML Get Int Value

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 Daikenkaiking   Members   

122
Like
0Likes
Like

Posted 19 February 2008 - 10:47 PM

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. :)

#2 djofdifjpodjfpodkpofdpofpd   Members   

120
Like
0Likes
Like

Posted 19 February 2008 - 11:05 PM

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

#3 Daikenkaiking   Members   

122
Like
0Likes
Like

Posted 19 February 2008 - 11:16 PM

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? :)

#4 Kylotan   Moderators   

8804
Like
0Likes
Like

Posted 19 February 2008 - 11:31 PM

http://www.grinninglizard.com/tinyxmldocs/classTiXmlElement.html#a6




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.