I have problems working with strings in irrlicht.
For instance I have a string like “model.3ds” in an XML file und want to use it as text label on a GUI element.
How can the content be transported from the xml file to the GUI label?
You can probaly do setText( irr::core::stringw(StartUpModelFile).c_str() );
Which is fine as long as you have only ansi strings (no international characters). If you have unicode or multibyte strings then you have to convert them (Irrlicht trunk has some functions for that).
that was exactly, what I needed.
Works like a charm
Thank you for your help.
From my non expert point of view those many different string types in c++ are a plaque.
I have problems to understand why in a small area like the irrlicht API it wasn't possible to concentrate on one string type
for all the function parameters instead of making endless conversions necessary.
The problem is you still get all kind of different string types from all kind of places. C++ has to handle all those - it didn't create them in the first place :-)
If you know you have wide-string in your xml you can use getAttributeAsStringW instead of getAttributeValue.
Irrlicht used some places stringc (like logging and for labels). Which is a little unfortunate, but not easy to change without breaking all applications using Irrlicht.