-1

Do I do it like:

wchar_t *str = L"12345";

because that doesn't seem to be working.

Comments
This post doesn't seems to be working, neither.
3
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by scru
Featured Replies
  • 1
    Salem 5,138   7 Years Ago

    Do you have a decent definition of "doesn't seem to be working"? Nothing is printed? Something is printed? Your disk has been reformatted? Read More

1

Do you have a decent definition of "doesn't seem to be working"?

Nothing is printed?
Something is printed?
Your disk has been reformatted?

Comments
thanks for the morning chuckle
0

Do you have a decent definition of "doesn't seem to be working"?

Nothing is printed?
Something is printed?
Your disk has been reformatted?

Sorry,

When using the L"str" as an argument to a function, it only gives the first character of the string (ie, 's')

Also, the following snippet prints nothing:

wprintf(L"%s\n", L"string");
0

Oops I found what the problem is. The function expects ucs2 and wchar_t is ucs4.

I'm about to mark this as solved, but does anybody have any idea how to get around this (give the function what it wants)?

0

Now when you say "gcc", are we assuming Linux, or one of the windows ports like MinGW or DJGPP (or others?)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.