I have seen that irrlicht uses const wchar_t pointers to write "GUI" texts.
I haven't found any function to copy the content of a "const wchar_t *" to another "const wchar_t *", not copying only the pointer to the same content.
I would like to know if exists any fuction that does this work or another easy way to do it instead of making a function to copy wchar to wchar myself.
Thanks.
WCHAR_T problems
-
- Posts: 340
- Joined: Wed Sep 28, 2005 4:38 pm
- Location: Canada, Eh!
re:
I don't quite understand what you're getting at, could you be a bit more specific, maybe give us the code you're using?
-
- Posts: 6
- Joined: Tue Oct 11, 2005 9:15 pm
I'll try to be more specific.
I want to use this function of the IGUI::Font:
virtual void draw (const wchar_t *text, const core::rect< s32 > &position, video::SColor color, bool hcenter=false, bool vcenter=false, const core::rect< s32 > *clip=0)=0
The first parameter is a const wchar_t pointer so:
const wchar_t * text1 = L"Hello";
const wchar_t * text2;
text2 = text1; //this only copies the pointer not the content, I want to have two different Hello's
I was asking for a function or an easy way to do this. I'm not very good using pointers, I'm an Ada programmer XD
Sorry about my English, it isn't my native language
I want to use this function of the IGUI::Font:
virtual void draw (const wchar_t *text, const core::rect< s32 > &position, video::SColor color, bool hcenter=false, bool vcenter=false, const core::rect< s32 > *clip=0)=0
The first parameter is a const wchar_t pointer so:
const wchar_t * text1 = L"Hello";
const wchar_t * text2;
text2 = text1; //this only copies the pointer not the content, I want to have two different Hello's
I was asking for a function or an easy way to do this. I'm not very good using pointers, I'm an Ada programmer XD
Sorry about my English, it isn't my native language
this code is in most of the tutorials
Code: Select all
wchar_t tmp[1024];
swprintf(tmp, 1024, L"[%s] fps:%d", driver->getName(), fps);
device->setWindowCaption(tmp);
-
- Posts: 6
- Joined: Tue Oct 11, 2005 9:15 pm