NOOB - stringw conversion to char*

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
fabs
Posts: 18
Joined: Sun Jun 25, 2006 1:41 pm

NOOB - stringw conversion to char*

Post by fabs »

For this bit of code:

Code: Select all

       core::stringw out213 = L"hello test ";
       out213 += rx;
       out213 += L"\n";
       char* lolololol = irr::core::stringw::c_str(out213);
       printf(lolololol);
i get this error:

Code: Select all

[Line] 97 no matching function for call to `irr::core::string<wchar_t>::c_str(irr::core::stringw&)' 
Any ideas? I'm eager to learn this new engine!
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

stringc(thestringw).c_str(); returns a char*
OR
stringc cstr = wstr;
and do with cstr as you will...
pushpork
rooly
Posts: 224
Joined: Tue Oct 25, 2005 4:32 pm
Location: Louisiana, USA, backwater country
Contact:

Post by rooly »

damn you jpull, you stole my quote! i've had that quote for 3 months or so straight. no matter, its always good to know there are 10 kinds of people in the world. anywho yeah, just make a char * and your good to go.
When banks compete, you win.
When ISPs compete, you win.
When electronics retailers compete, you win.
When governments compete...you get drafted.
fabs
Posts: 18
Joined: Sun Jun 25, 2006 1:41 pm

Post by fabs »

Code: Select all

char* lolololol = stringc(out213).c_str();
Still not working X_X (If i get this worked out most of the maunal will make sense :P)

Anyhow, this is the error:

Code: Select all

no match for call to `(irr::core::stringc) (irr::core::stringw&)' 
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
fabs
Posts: 18
Joined: Sun Jun 25, 2006 1:41 pm

Post by fabs »

Thx ^_^
Post Reply