string TO const c8*

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rcelha
Posts: 6
Joined: Tue Feb 26, 2008 2:13 pm

string TO const c8*

Post by rcelha »

I've made a class that read content from xml file based on IrrXML. Is a very simples class, with that i pass only the path and the class return the value - some like xmlParser.getValue("/level/name") to get the value of node, or xmlParser.getValue("/level/skybox/up", "file") to get the attribute 'file' of node 'up').

Well, the question is, the irrXML return a string to me, and i need cast that to const c8* ( to load texture, by example).

Any idea?

Tnx
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If it's a core::stringc you can call .c_str() on that object to get the const char*.
rcelha
Posts: 6
Joined: Tue Feb 26, 2008 2:13 pm

Post by rcelha »

hybrid, i've tryed this... but i think that i was confused when did it, hehehe


I'll try with more patience.... and tell you later....

Thanks a lot, guy
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

and if it's a char* than remember c8* in fact is char* !!! ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
rcelha
Posts: 6
Joined: Tue Feb 26, 2008 2:13 pm

Post by rcelha »

Folks!!!

tnx for that, now are really working :D

:)
Post Reply