Page 1 of 1

stringw, how to get its guts

Posted: Thu Jul 19, 2007 4:35 pm
by kendric
Why does stringw have:
c_str
but no
w_str?

How am I supposed to pass its data to a function such as:
font->draw(wchar*....

Whats the point of a wchar wrapper if you can't get to the wchars easily?

I could convert it to a char* and then convert it back to a wchar* with some other function but I would lose all the data that wchar provides wouldn't I?

Am I missing something, I feel so noobish(comming from a java background)

Posted: Thu Jul 19, 2007 4:51 pm
by beshrkayali
funny isn't it,

I was coming to ask that same question :lol:

is it something with those L chars before the text in the "" signs??

need help in here too :roll:

Posted: Thu Jul 19, 2007 5:06 pm
by Klasker
stringw's c_str() method returns a wchar_t*

The C in c_str() relates to the programming language C (as in, C-style string) and is not an abbreviation of char.

Posted: Fri Jul 20, 2007 1:18 am
by kendric
Oh wow, what an idiot moment. Sorry and thanks for the answer ;)