How to convert c8* to wchar_t* and inverse

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
JiB-z

How to convert c8* to wchar_t* and inverse

Post by JiB-z »

(I'm french so if my english...)
I want get the path of one map which is in a listbox so I type this :

Code: Select all

          pathMap = lst_Map->getListItem(lst_Map->getSelected());
After, I want use this path to load the map :

Code: Select all

         mesh_Map = Smgr->getMesh(pathMap);
This is the problem "getMesh()" take a c8* argument and I have a wchar_t*.
What is the fonction for convert c8* to wchar_t* ? (perhaps like wcstombs()).
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Also, why do none of the Irrlicht functions take the core string class for filenames? They all take c8* which doesn't really make sense since the XML format dumps the info in stringc.
Mercior
Posts: 100
Joined: Tue Feb 24, 2004 1:53 am
Location: UK
Contact:

Post by Mercior »

JiB-z
Posts: 7
Joined: Sun Apr 11, 2004 12:54 pm
Location: Bordeaux (France)

Post by JiB-z »

Ok big thanks
Dragon7
Posts: 7
Joined: Sun Apr 11, 2004 1:28 pm

Post by Dragon7 »

For wchar I use .c_str() of stringw in the irrlicht api, and to construct it, you could use it's overloaded member?
Post Reply